mirror of
https://github.com/stoatchat/livekit-protocol.git
synced 2026-06-30 22:08:35 -04:00
Add AgentDispatchInternal service. Add JobTerminate to AgentService (#782)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@livekit/protocol": patch
|
||||
---
|
||||
|
||||
Add AgentDispatchInternal service. Add JobTerminate to AgentService
|
||||
+183
-172
@@ -296,11 +296,12 @@ type JobState struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Status JobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=livekit.JobStatus" json:"status,omitempty"`
|
||||
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
StartedAt int64 `protobuf:"varint,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
|
||||
EndedAt int64 `protobuf:"varint,4,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
Status JobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=livekit.JobStatus" json:"status,omitempty"`
|
||||
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
StartedAt int64 `protobuf:"varint,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
|
||||
EndedAt int64 `protobuf:"varint,4,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
ParticipantIdentity string `protobuf:"bytes,6,opt,name=participant_identity,json=participantIdentity,proto3" json:"participant_identity,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JobState) Reset() {
|
||||
@@ -370,6 +371,13 @@ func (x *JobState) GetUpdatedAt() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *JobState) GetParticipantIdentity() string {
|
||||
if x != nil {
|
||||
return x.ParticipantIdentity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// from Worker to Server
|
||||
type WorkerMessage struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -1427,7 +1435,7 @@ var file_livekit_agent_proto_rawDesc = []byte{
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f,
|
||||
0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0e, 0x0a,
|
||||
0x0c, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0xa5, 0x01,
|
||||
0x0c, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0xd8, 0x01,
|
||||
0x0a, 0x08, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
|
||||
@@ -1438,174 +1446,177 @@ var file_livekit_agent_proto_rawDesc = []byte{
|
||||
0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65,
|
||||
0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xc8, 0x03, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x69, 0x76, 0x65,
|
||||
0x6b, 0x69, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x67,
|
||||
0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
|
||||
0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x69,
|
||||
0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69,
|
||||
0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x76,
|
||||
0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x75, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00,
|
||||
0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x39,
|
||||
0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x09,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x69, 0x6e,
|
||||
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04,
|
||||
0x70, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x6d, 0x75, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x69,
|
||||
0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61,
|
||||
0x74, 0x65, 0x4a, 0x6f, 0x62, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
|
||||
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
|
||||
0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65,
|
||||
0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x3b, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a,
|
||||
0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52,
|
||||
0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x04,
|
||||
0x70, 0x6f, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f, 0x6e, 0x67, 0x48,
|
||||
0x00, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x12, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4a,
|
||||
0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
|
||||
0x21, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f,
|
||||
0x6f, 0x6d, 0x12, 0x3a, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x2a,
|
||||
0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x51, 0x0a, 0x0a, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74,
|
||||
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x9d, 0x02,
|
||||
0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e,
|
||||
0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70,
|
||||
0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x09, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4f,
|
||||
0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x69,
|
||||
0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x61, 0x6c, 0x6c,
|
||||
0x6f, 0x77, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42,
|
||||
0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x6b, 0x0a,
|
||||
0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65,
|
||||
0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69,
|
||||
0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x76, 0x65,
|
||||
0x6b, 0x69, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x11, 0x4d, 0x69,
|
||||
0x67, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x17, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x06, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x51, 0x0a, 0x13, 0x41, 0x76, 0x61, 0x69,
|
||||
0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x1e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c,
|
||||
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xc0, 0x03, 0x0a, 0x14,
|
||||
0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
|
||||
0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x75, 0x70,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x65, 0x73, 0x75,
|
||||
0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61,
|
||||
0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a,
|
||||
0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72,
|
||||
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13,
|
||||
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x12, 0x6f, 0x0a, 0x16, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6e, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x76,
|
||||
0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x41, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x70,
|
||||
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
|
||||
0x75, 0x74, 0x65, 0x73, 0x1a, 0x48, 0x0a, 0x1a, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
|
||||
0x61, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6a,
|
||||
0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||
0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x12, 0x55,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
|
||||
0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74,
|
||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0xc8, 0x03, 0x0a, 0x0d, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x72, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c,
|
||||
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08,
|
||||
0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69,
|
||||
0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d,
|
||||
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
|
||||
0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52,
|
||||
0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a,
|
||||
0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x02, 0x52, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62,
|
||||
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6a, 0x6f,
|
||||
0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x22, 0x64, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x73, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65,
|
||||
0x72, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48,
|
||||
0x00, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x0a, 0x04,
|
||||
0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x69, 0x6e, 0x67, 0x48,
|
||||
0x00, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x6d, 0x75, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69,
|
||||
0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x69, 0x67,
|
||||
0x72, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
||||
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
|
||||
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x69,
|
||||
0x67, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69,
|
||||
0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69,
|
||||
0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c,
|
||||
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f,
|
||||
0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x12, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04,
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0d, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52,
|
||||
0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x3a, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
|
||||
0x70, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x22, 0x2a, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x69, 0x6e, 0x67, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x51, 0x0a,
|
||||
0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
|
||||
0x22, 0x9d, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||
0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x6e,
|
||||
0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x21,
|
||||
0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01,
|
||||
0x01, 0x12, 0x4f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
|
||||
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
|
||||
0x70, 0x61, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12,
|
||||
0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x22, 0x6b, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c,
|
||||
0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a,
|
||||
0x11, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x51, 0x0a, 0x13, 0x41,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x1e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a,
|
||||
0x6f, 0x62, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x00, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42,
|
||||
0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x27, 0x0a, 0x0e, 0x4a, 0x6f, 0x62, 0x54, 0x65,
|
||||
0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64,
|
||||
0x2a, 0x28, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4a,
|
||||
0x54, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x54, 0x5f, 0x50,
|
||||
0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x10, 0x01, 0x2a, 0x2d, 0x0a, 0x0c, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x57, 0x53,
|
||||
0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x57, 0x53, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x2a, 0x4a, 0x0a, 0x09, 0x4a, 0x6f, 0x62,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f, 0x50, 0x45, 0x4e,
|
||||
0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f, 0x52, 0x55, 0x4e,
|
||||
0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f, 0x53, 0x55, 0x43,
|
||||
0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x46, 0x41, 0x49,
|
||||
0x4c, 0x45, 0x44, 0x10, 0x03, 0x42, 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c,
|
||||
0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c,
|
||||
0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xc0,
|
||||
0x03, 0x0a, 0x14, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f,
|
||||
0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52,
|
||||
0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
|
||||
0x70, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13,
|
||||
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6f, 0x0a, 0x16, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63,
|
||||
0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
|
||||
0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74,
|
||||
0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x41, 0x74, 0x74,
|
||||
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x48, 0x0a, 0x1a, 0x50, 0x61, 0x72, 0x74, 0x69,
|
||||
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x22, 0x6a, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x69,
|
||||
0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x84, 0x01,
|
||||
0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x6a, 0x6f, 0x62, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x6a, 0x6f, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x22, 0x64, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62,
|
||||
0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x27, 0x0a, 0x0e, 0x4a, 0x6f,
|
||||
0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06,
|
||||
0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f,
|
||||
0x62, 0x49, 0x64, 0x2a, 0x28, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x4a, 0x54, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4a,
|
||||
0x54, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x10, 0x01, 0x2a, 0x2d, 0x0a,
|
||||
0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a,
|
||||
0x0c, 0x57, 0x53, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x57, 0x53, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x2a, 0x4a, 0x0a, 0x09,
|
||||
0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f,
|
||||
0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f,
|
||||
0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x53, 0x5f,
|
||||
0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f,
|
||||
0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x42, 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa,
|
||||
0x02, 0x0d, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea,
|
||||
0x02, 0x0e, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -158,6 +158,7 @@ type DeleteAgentDispatchRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
DispatchId string `protobuf:"bytes,1,opt,name=dispatch_id,json=dispatchId,proto3" json:"dispatch_id,omitempty"`
|
||||
Room string `protobuf:"bytes,2,opt,name=room,proto3" json:"room,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteAgentDispatchRequest) Reset() {
|
||||
@@ -199,7 +200,14 @@ func (x *DeleteAgentDispatchRequest) GetDispatchId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListAgentDispatchRequesst struct {
|
||||
func (x *DeleteAgentDispatchRequest) GetRoom() string {
|
||||
if x != nil {
|
||||
return x.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListAgentDispatchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -208,8 +216,8 @@ type ListAgentDispatchRequesst struct {
|
||||
Room string `protobuf:"bytes,2,opt,name=room,proto3" json:"room,omitempty"` // name of the room to list agents for. Must be set.
|
||||
}
|
||||
|
||||
func (x *ListAgentDispatchRequesst) Reset() {
|
||||
*x = ListAgentDispatchRequesst{}
|
||||
func (x *ListAgentDispatchRequest) Reset() {
|
||||
*x = ListAgentDispatchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_livekit_agent_dispatch_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -217,13 +225,13 @@ func (x *ListAgentDispatchRequesst) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListAgentDispatchRequesst) String() string {
|
||||
func (x *ListAgentDispatchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAgentDispatchRequesst) ProtoMessage() {}
|
||||
func (*ListAgentDispatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListAgentDispatchRequesst) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListAgentDispatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_livekit_agent_dispatch_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -235,19 +243,19 @@ func (x *ListAgentDispatchRequesst) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListAgentDispatchRequesst.ProtoReflect.Descriptor instead.
|
||||
func (*ListAgentDispatchRequesst) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListAgentDispatchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListAgentDispatchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_livekit_agent_dispatch_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ListAgentDispatchRequesst) GetDispatchId() string {
|
||||
func (x *ListAgentDispatchRequest) GetDispatchId() string {
|
||||
if x != nil {
|
||||
return x.DispatchId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListAgentDispatchRequesst) GetRoom() string {
|
||||
func (x *ListAgentDispatchRequest) GetRoom() string {
|
||||
if x != nil {
|
||||
return x.Room
|
||||
}
|
||||
@@ -463,62 +471,63 @@ var file_livekit_agent_dispatch_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x1a, 0x44, 0x65, 0x6c,
|
||||
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x51, 0x0a, 0x1a, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x61,
|
||||
0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63,
|
||||
0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x70,
|
||||
0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x5e, 0x0a, 0x19, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e,
|
||||
0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0f, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x0d, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72,
|
||||
0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x05, 0x73,
|
||||
0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
|
||||
0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x74,
|
||||
0x0a, 0x12, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62,
|
||||
0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||
0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x32, 0x8c, 0x02, 0x0a, 0x14, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a,
|
||||
0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12,
|
||||
0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x0e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x23,
|
||||
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x56, 0x0a, 0x0c, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x2e, 0x6c, 0x69,
|
||||
0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44,
|
||||
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x73, 0x74, 0x1a,
|
||||
0x22, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x42, 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c, 0x69, 0x76,
|
||||
0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c, 0x69, 0x76,
|
||||
0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x4f, 0x0a, 0x18,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63,
|
||||
0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70,
|
||||
0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64,
|
||||
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f,
|
||||
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x5e, 0x0a,
|
||||
0x19, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
|
||||
0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x61, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0f, 0x61, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0xa1, 0x01,
|
||||
0x0a, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f,
|
||||
0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31,
|
||||
0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73,
|
||||
0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,
|
||||
0x65, 0x22, 0x74, 0x0a, 0x12, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
|
||||
0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e,
|
||||
0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0x8b, 0x02, 0x0a, 0x14, 0x41, 0x67, 0x65, 0x6e,
|
||||
0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
|
||||
0x63, 0x68, 0x12, 0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12,
|
||||
0x4d, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63,
|
||||
0x68, 0x12, 0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74,
|
||||
0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x55,
|
||||
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x21,
|
||||
0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c,
|
||||
0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c,
|
||||
0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -538,7 +547,7 @@ var file_livekit_agent_dispatch_proto_goTypes = []any{
|
||||
(*CreateAgentDispatchRequest)(nil), // 0: livekit.CreateAgentDispatchRequest
|
||||
(*RoomAgentDispatch)(nil), // 1: livekit.RoomAgentDispatch
|
||||
(*DeleteAgentDispatchRequest)(nil), // 2: livekit.DeleteAgentDispatchRequest
|
||||
(*ListAgentDispatchRequesst)(nil), // 3: livekit.ListAgentDispatchRequesst
|
||||
(*ListAgentDispatchRequest)(nil), // 3: livekit.ListAgentDispatchRequest
|
||||
(*ListAgentDispatchResponse)(nil), // 4: livekit.ListAgentDispatchResponse
|
||||
(*AgentDispatch)(nil), // 5: livekit.AgentDispatch
|
||||
(*AgentDispatchState)(nil), // 6: livekit.AgentDispatchState
|
||||
@@ -550,7 +559,7 @@ var file_livekit_agent_dispatch_proto_depIdxs = []int32{
|
||||
7, // 2: livekit.AgentDispatchState.jobs:type_name -> livekit.Job
|
||||
0, // 3: livekit.AgentDispatchService.CreateDispatch:input_type -> livekit.CreateAgentDispatchRequest
|
||||
2, // 4: livekit.AgentDispatchService.DeleteDispatch:input_type -> livekit.DeleteAgentDispatchRequest
|
||||
3, // 5: livekit.AgentDispatchService.ListDispatch:input_type -> livekit.ListAgentDispatchRequesst
|
||||
3, // 5: livekit.AgentDispatchService.ListDispatch:input_type -> livekit.ListAgentDispatchRequest
|
||||
5, // 6: livekit.AgentDispatchService.CreateDispatch:output_type -> livekit.AgentDispatch
|
||||
5, // 7: livekit.AgentDispatchService.DeleteDispatch:output_type -> livekit.AgentDispatch
|
||||
4, // 8: livekit.AgentDispatchService.ListDispatch:output_type -> livekit.ListAgentDispatchResponse
|
||||
@@ -605,7 +614,7 @@ func file_livekit_agent_dispatch_proto_init() {
|
||||
}
|
||||
}
|
||||
file_livekit_agent_dispatch_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ListAgentDispatchRequesst); i {
|
||||
switch v := v.(*ListAgentDispatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,197 +0,0 @@
|
||||
// Copyright 2023 LiveKit, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v5.27.0
|
||||
// source: livekit_agent.proto
|
||||
|
||||
package livekit
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
AgentService_CreateDispatch_FullMethodName = "/livekit.AgentService/CreateDispatch"
|
||||
AgentService_DeleteDispatch_FullMethodName = "/livekit.AgentService/DeleteDispatch"
|
||||
AgentService_ListDispatch_FullMethodName = "/livekit.AgentService/ListDispatch"
|
||||
)
|
||||
|
||||
// AgentServiceClient is the client API for AgentService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type AgentServiceClient interface {
|
||||
CreateDispatch(ctx context.Context, in *CreateAgentDispatchRequest, opts ...grpc.CallOption) (*AgentDispatch, error)
|
||||
DeleteDispatch(ctx context.Context, in *DeleteAgentDispatchRequest, opts ...grpc.CallOption) (*AgentDispatch, error)
|
||||
ListDispatch(ctx context.Context, in *ListAgentDispatchRequesst, opts ...grpc.CallOption) (*ListAgentDispatchResponse, error)
|
||||
}
|
||||
|
||||
type agentServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient {
|
||||
return &agentServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *agentServiceClient) CreateDispatch(ctx context.Context, in *CreateAgentDispatchRequest, opts ...grpc.CallOption) (*AgentDispatch, error) {
|
||||
out := new(AgentDispatch)
|
||||
err := c.cc.Invoke(ctx, AgentService_CreateDispatch_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentServiceClient) DeleteDispatch(ctx context.Context, in *DeleteAgentDispatchRequest, opts ...grpc.CallOption) (*AgentDispatch, error) {
|
||||
out := new(AgentDispatch)
|
||||
err := c.cc.Invoke(ctx, AgentService_DeleteDispatch_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentServiceClient) ListDispatch(ctx context.Context, in *ListAgentDispatchRequesst, opts ...grpc.CallOption) (*ListAgentDispatchResponse, error) {
|
||||
out := new(ListAgentDispatchResponse)
|
||||
err := c.cc.Invoke(ctx, AgentService_ListDispatch_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AgentServiceServer is the server API for AgentService service.
|
||||
// All implementations must embed UnimplementedAgentServiceServer
|
||||
// for forward compatibility
|
||||
type AgentServiceServer interface {
|
||||
CreateDispatch(context.Context, *CreateAgentDispatchRequest) (*AgentDispatch, error)
|
||||
DeleteDispatch(context.Context, *DeleteAgentDispatchRequest) (*AgentDispatch, error)
|
||||
ListDispatch(context.Context, *ListAgentDispatchRequesst) (*ListAgentDispatchResponse, error)
|
||||
mustEmbedUnimplementedAgentServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAgentServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedAgentServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedAgentServiceServer) CreateDispatch(context.Context, *CreateAgentDispatchRequest) (*AgentDispatch, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDispatch not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServiceServer) DeleteDispatch(context.Context, *DeleteAgentDispatchRequest) (*AgentDispatch, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteDispatch not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServiceServer) ListDispatch(context.Context, *ListAgentDispatchRequesst) (*ListAgentDispatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListDispatch not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {}
|
||||
|
||||
// UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AgentServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAgentServiceServer interface {
|
||||
mustEmbedUnimplementedAgentServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {
|
||||
s.RegisterService(&AgentService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AgentService_CreateDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAgentDispatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentServiceServer).CreateDispatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentService_CreateDispatch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentServiceServer).CreateDispatch(ctx, req.(*CreateAgentDispatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentService_DeleteDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAgentDispatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentServiceServer).DeleteDispatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentService_DeleteDispatch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentServiceServer).DeleteDispatch(ctx, req.(*DeleteAgentDispatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentService_ListDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAgentDispatchRequesst)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentServiceServer).ListDispatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentService_ListDispatch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentServiceServer).ListDispatch(ctx, req.(*ListAgentDispatchRequesst))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AgentService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "livekit.AgentService",
|
||||
HandlerType: (*AgentServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateDispatch",
|
||||
Handler: _AgentService_CreateDispatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDispatch",
|
||||
Handler: _AgentService_DeleteDispatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListDispatch",
|
||||
Handler: _AgentService_ListDispatch_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "livekit_agent.proto",
|
||||
}
|
||||
@@ -16,11 +16,6 @@ import proto "google.golang.org/protobuf/proto"
|
||||
import twirp "github.com/twitchtv/twirp"
|
||||
import ctxsetters "github.com/twitchtv/twirp/ctxsetters"
|
||||
|
||||
import bytes "bytes"
|
||||
import errors "errors"
|
||||
import path "path"
|
||||
import url "net/url"
|
||||
|
||||
// Version compatibility assertion.
|
||||
// If the constant is not defined in the package, that likely means
|
||||
// the package needs to be updated to work with this generated code.
|
||||
@@ -2744,7 +2739,7 @@ func (s *egressServer) serveStopEgressProtobuf(ctx context.Context, resp http.Re
|
||||
}
|
||||
|
||||
func (s *egressServer) ServiceDescriptor() ([]byte, int) {
|
||||
return twirpFileDescriptor0, 0
|
||||
return twirpFileDescriptor1, 0
|
||||
}
|
||||
|
||||
func (s *egressServer) ProtocGenTwirpVersion() string {
|
||||
@@ -2758,572 +2753,7 @@ func (s *egressServer) PathPrefix() string {
|
||||
return baseServicePath(s.pathPrefix, "livekit", "Egress")
|
||||
}
|
||||
|
||||
// =====
|
||||
// Utils
|
||||
// =====
|
||||
|
||||
// HTTPClient is the interface used by generated clients to send HTTP requests.
|
||||
// It is fulfilled by *(net/http).Client, which is sufficient for most users.
|
||||
// Users can provide their own implementation for special retry policies.
|
||||
//
|
||||
// HTTPClient implementations should not follow redirects. Redirects are
|
||||
// automatically disabled if *(net/http).Client is passed to client
|
||||
// constructors. See the withoutRedirects function in this file for more
|
||||
// details.
|
||||
type HTTPClient interface {
|
||||
Do(req *http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
// TwirpServer is the interface generated server structs will support: they're
|
||||
// HTTP handlers with additional methods for accessing metadata about the
|
||||
// service. Those accessors are a low-level API for building reflection tools.
|
||||
// Most people can think of TwirpServers as just http.Handlers.
|
||||
type TwirpServer interface {
|
||||
http.Handler
|
||||
|
||||
// ServiceDescriptor returns gzipped bytes describing the .proto file that
|
||||
// this service was generated from. Once unzipped, the bytes can be
|
||||
// unmarshalled as a
|
||||
// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
|
||||
//
|
||||
// The returned integer is the index of this particular service within that
|
||||
// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
|
||||
// low-level field, expected to be used for reflection.
|
||||
ServiceDescriptor() ([]byte, int)
|
||||
|
||||
// ProtocGenTwirpVersion is the semantic version string of the version of
|
||||
// twirp used to generate this file.
|
||||
ProtocGenTwirpVersion() string
|
||||
|
||||
// PathPrefix returns the HTTP URL path prefix for all methods handled by this
|
||||
// service. This can be used with an HTTP mux to route Twirp requests.
|
||||
// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
|
||||
// that is, everything in a Twirp route except for the <Method> at the end.
|
||||
PathPrefix() string
|
||||
}
|
||||
|
||||
func newServerOpts(opts []interface{}) *twirp.ServerOptions {
|
||||
serverOpts := &twirp.ServerOptions{}
|
||||
for _, opt := range opts {
|
||||
switch o := opt.(type) {
|
||||
case twirp.ServerOption:
|
||||
o(serverOpts)
|
||||
case *twirp.ServerHooks: // backwards compatibility, allow to specify hooks as an argument
|
||||
twirp.WithServerHooks(o)(serverOpts)
|
||||
case nil: // backwards compatibility, allow nil value for the argument
|
||||
continue
|
||||
default:
|
||||
panic(fmt.Sprintf("Invalid option type %T, please use a twirp.ServerOption", o))
|
||||
}
|
||||
}
|
||||
return serverOpts
|
||||
}
|
||||
|
||||
// WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta).
|
||||
// Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks.
|
||||
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
|
||||
func WriteError(resp http.ResponseWriter, err error) {
|
||||
writeError(context.Background(), resp, err, nil)
|
||||
}
|
||||
|
||||
// writeError writes Twirp errors in the response and triggers hooks.
|
||||
func writeError(ctx context.Context, resp http.ResponseWriter, err error, hooks *twirp.ServerHooks) {
|
||||
// Convert to a twirp.Error. Non-twirp errors are converted to internal errors.
|
||||
var twerr twirp.Error
|
||||
if !errors.As(err, &twerr) {
|
||||
twerr = twirp.InternalErrorWith(err)
|
||||
}
|
||||
|
||||
statusCode := twirp.ServerHTTPStatusFromErrorCode(twerr.Code())
|
||||
ctx = ctxsetters.WithStatusCode(ctx, statusCode)
|
||||
ctx = callError(ctx, hooks, twerr)
|
||||
|
||||
respBody := marshalErrorToJSON(twerr)
|
||||
|
||||
resp.Header().Set("Content-Type", "application/json") // Error responses are always JSON
|
||||
resp.Header().Set("Content-Length", strconv.Itoa(len(respBody)))
|
||||
resp.WriteHeader(statusCode) // set HTTP status code and send response
|
||||
|
||||
_, writeErr := resp.Write(respBody)
|
||||
if writeErr != nil {
|
||||
// We have three options here. We could log the error, call the Error
|
||||
// hook, or just silently ignore the error.
|
||||
//
|
||||
// Logging is unacceptable because we don't have a user-controlled
|
||||
// logger; writing out to stderr without permission is too rude.
|
||||
//
|
||||
// Calling the Error hook would confuse users: it would mean the Error
|
||||
// hook got called twice for one request, which is likely to lead to
|
||||
// duplicated log messages and metrics, no matter how well we document
|
||||
// the behavior.
|
||||
//
|
||||
// Silently ignoring the error is our least-bad option. It's highly
|
||||
// likely that the connection is broken and the original 'err' says
|
||||
// so anyway.
|
||||
_ = writeErr
|
||||
}
|
||||
|
||||
callResponseSent(ctx, hooks)
|
||||
}
|
||||
|
||||
// sanitizeBaseURL parses the the baseURL, and adds the "http" scheme if needed.
|
||||
// If the URL is unparsable, the baseURL is returned unchanged.
|
||||
func sanitizeBaseURL(baseURL string) string {
|
||||
u, err := url.Parse(baseURL)
|
||||
if err != nil {
|
||||
return baseURL // invalid URL will fail later when making requests
|
||||
}
|
||||
if u.Scheme == "" {
|
||||
u.Scheme = "http"
|
||||
}
|
||||
return u.String()
|
||||
}
|
||||
|
||||
// baseServicePath composes the path prefix for the service (without <Method>).
|
||||
// e.g.: baseServicePath("/twirp", "my.pkg", "MyService")
|
||||
//
|
||||
// returns => "/twirp/my.pkg.MyService/"
|
||||
//
|
||||
// e.g.: baseServicePath("", "", "MyService")
|
||||
//
|
||||
// returns => "/MyService/"
|
||||
func baseServicePath(prefix, pkg, service string) string {
|
||||
fullServiceName := service
|
||||
if pkg != "" {
|
||||
fullServiceName = pkg + "." + service
|
||||
}
|
||||
return path.Join("/", prefix, fullServiceName) + "/"
|
||||
}
|
||||
|
||||
// parseTwirpPath extracts path components form a valid Twirp route.
|
||||
// Expected format: "[<prefix>]/<package>.<Service>/<Method>"
|
||||
// e.g.: prefix, pkgService, method := parseTwirpPath("/twirp/pkg.Svc/MakeHat")
|
||||
func parseTwirpPath(path string) (string, string, string) {
|
||||
parts := strings.Split(path, "/")
|
||||
if len(parts) < 2 {
|
||||
return "", "", ""
|
||||
}
|
||||
method := parts[len(parts)-1]
|
||||
pkgService := parts[len(parts)-2]
|
||||
prefix := strings.Join(parts[0:len(parts)-2], "/")
|
||||
return prefix, pkgService, method
|
||||
}
|
||||
|
||||
// getCustomHTTPReqHeaders retrieves a copy of any headers that are set in
|
||||
// a context through the twirp.WithHTTPRequestHeaders function.
|
||||
// If there are no headers set, or if they have the wrong type, nil is returned.
|
||||
func getCustomHTTPReqHeaders(ctx context.Context) http.Header {
|
||||
header, ok := twirp.HTTPRequestHeaders(ctx)
|
||||
if !ok || header == nil {
|
||||
return nil
|
||||
}
|
||||
copied := make(http.Header)
|
||||
for k, vv := range header {
|
||||
if vv == nil {
|
||||
copied[k] = nil
|
||||
continue
|
||||
}
|
||||
copied[k] = make([]string, len(vv))
|
||||
copy(copied[k], vv)
|
||||
}
|
||||
return copied
|
||||
}
|
||||
|
||||
// newRequest makes an http.Request from a client, adding common headers.
|
||||
func newRequest(ctx context.Context, url string, reqBody io.Reader, contentType string) (*http.Request, error) {
|
||||
req, err := http.NewRequest("POST", url, reqBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req = req.WithContext(ctx)
|
||||
if customHeader := getCustomHTTPReqHeaders(ctx); customHeader != nil {
|
||||
req.Header = customHeader
|
||||
}
|
||||
req.Header.Set("Accept", contentType)
|
||||
req.Header.Set("Content-Type", contentType)
|
||||
req.Header.Set("Twirp-Version", "v8.1.3")
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// JSON serialization for errors
|
||||
type twerrJSON struct {
|
||||
Code string `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Meta map[string]string `json:"meta,omitempty"`
|
||||
}
|
||||
|
||||
// marshalErrorToJSON returns JSON from a twirp.Error, that can be used as HTTP error response body.
|
||||
// If serialization fails, it will use a descriptive Internal error instead.
|
||||
func marshalErrorToJSON(twerr twirp.Error) []byte {
|
||||
// make sure that msg is not too large
|
||||
msg := twerr.Msg()
|
||||
if len(msg) > 1e6 {
|
||||
msg = msg[:1e6]
|
||||
}
|
||||
|
||||
tj := twerrJSON{
|
||||
Code: string(twerr.Code()),
|
||||
Msg: msg,
|
||||
Meta: twerr.MetaMap(),
|
||||
}
|
||||
|
||||
buf, err := json.Marshal(&tj)
|
||||
if err != nil {
|
||||
buf = []byte("{\"type\": \"" + twirp.Internal + "\", \"msg\": \"There was an error but it could not be serialized into JSON\"}") // fallback
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
// errorFromResponse builds a twirp.Error from a non-200 HTTP response.
|
||||
// If the response has a valid serialized Twirp error, then it's returned.
|
||||
// If not, the response status code is used to generate a similar twirp
|
||||
// error. See twirpErrorFromIntermediary for more info on intermediary errors.
|
||||
func errorFromResponse(resp *http.Response) twirp.Error {
|
||||
statusCode := resp.StatusCode
|
||||
statusText := http.StatusText(statusCode)
|
||||
|
||||
if isHTTPRedirect(statusCode) {
|
||||
// Unexpected redirect: it must be an error from an intermediary.
|
||||
// Twirp clients don't follow redirects automatically, Twirp only handles
|
||||
// POST requests, redirects should only happen on GET and HEAD requests.
|
||||
location := resp.Header.Get("Location")
|
||||
msg := fmt.Sprintf("unexpected HTTP status code %d %q received, Location=%q", statusCode, statusText, location)
|
||||
return twirpErrorFromIntermediary(statusCode, msg, location)
|
||||
}
|
||||
|
||||
respBodyBytes, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return wrapInternal(err, "failed to read server error response body")
|
||||
}
|
||||
|
||||
var tj twerrJSON
|
||||
dec := json.NewDecoder(bytes.NewReader(respBodyBytes))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&tj); err != nil || tj.Code == "" {
|
||||
// Invalid JSON response; it must be an error from an intermediary.
|
||||
msg := fmt.Sprintf("Error from intermediary with HTTP status code %d %q", statusCode, statusText)
|
||||
return twirpErrorFromIntermediary(statusCode, msg, string(respBodyBytes))
|
||||
}
|
||||
|
||||
errorCode := twirp.ErrorCode(tj.Code)
|
||||
if !twirp.IsValidErrorCode(errorCode) {
|
||||
msg := "invalid type returned from server error response: " + tj.Code
|
||||
return twirp.InternalError(msg).WithMeta("body", string(respBodyBytes))
|
||||
}
|
||||
|
||||
twerr := twirp.NewError(errorCode, tj.Msg)
|
||||
for k, v := range tj.Meta {
|
||||
twerr = twerr.WithMeta(k, v)
|
||||
}
|
||||
return twerr
|
||||
}
|
||||
|
||||
// twirpErrorFromIntermediary maps HTTP errors from non-twirp sources to twirp errors.
|
||||
// The mapping is similar to gRPC: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md.
|
||||
// Returned twirp Errors have some additional metadata for inspection.
|
||||
func twirpErrorFromIntermediary(status int, msg string, bodyOrLocation string) twirp.Error {
|
||||
var code twirp.ErrorCode
|
||||
if isHTTPRedirect(status) { // 3xx
|
||||
code = twirp.Internal
|
||||
} else {
|
||||
switch status {
|
||||
case 400: // Bad Request
|
||||
code = twirp.Internal
|
||||
case 401: // Unauthorized
|
||||
code = twirp.Unauthenticated
|
||||
case 403: // Forbidden
|
||||
code = twirp.PermissionDenied
|
||||
case 404: // Not Found
|
||||
code = twirp.BadRoute
|
||||
case 429: // Too Many Requests
|
||||
code = twirp.ResourceExhausted
|
||||
case 502, 503, 504: // Bad Gateway, Service Unavailable, Gateway Timeout
|
||||
code = twirp.Unavailable
|
||||
default: // All other codes
|
||||
code = twirp.Unknown
|
||||
}
|
||||
}
|
||||
|
||||
twerr := twirp.NewError(code, msg)
|
||||
twerr = twerr.WithMeta("http_error_from_intermediary", "true") // to easily know if this error was from intermediary
|
||||
twerr = twerr.WithMeta("status_code", strconv.Itoa(status))
|
||||
if isHTTPRedirect(status) {
|
||||
twerr = twerr.WithMeta("location", bodyOrLocation)
|
||||
} else {
|
||||
twerr = twerr.WithMeta("body", bodyOrLocation)
|
||||
}
|
||||
return twerr
|
||||
}
|
||||
|
||||
func isHTTPRedirect(status int) bool {
|
||||
return status >= 300 && status <= 399
|
||||
}
|
||||
|
||||
// wrapInternal wraps an error with a prefix as an Internal error.
|
||||
// The original error cause is accessible by github.com/pkg/errors.Cause.
|
||||
func wrapInternal(err error, prefix string) twirp.Error {
|
||||
return twirp.InternalErrorWith(&wrappedError{prefix: prefix, cause: err})
|
||||
}
|
||||
|
||||
type wrappedError struct {
|
||||
prefix string
|
||||
cause error
|
||||
}
|
||||
|
||||
func (e *wrappedError) Error() string { return e.prefix + ": " + e.cause.Error() }
|
||||
func (e *wrappedError) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As
|
||||
func (e *wrappedError) Cause() error { return e.cause } // for github.com/pkg/errors
|
||||
|
||||
// ensurePanicResponses makes sure that rpc methods causing a panic still result in a Twirp Internal
|
||||
// error response (status 500), and error hooks are properly called with the panic wrapped as an error.
|
||||
// The panic is re-raised so it can be handled normally with middleware.
|
||||
func ensurePanicResponses(ctx context.Context, resp http.ResponseWriter, hooks *twirp.ServerHooks) {
|
||||
if r := recover(); r != nil {
|
||||
// Wrap the panic as an error so it can be passed to error hooks.
|
||||
// The original error is accessible from error hooks, but not visible in the response.
|
||||
err := errFromPanic(r)
|
||||
twerr := &internalWithCause{msg: "Internal service panic", cause: err}
|
||||
// Actually write the error
|
||||
writeError(ctx, resp, twerr, hooks)
|
||||
// If possible, flush the error to the wire.
|
||||
f, ok := resp.(http.Flusher)
|
||||
if ok {
|
||||
f.Flush()
|
||||
}
|
||||
|
||||
panic(r)
|
||||
}
|
||||
}
|
||||
|
||||
// errFromPanic returns the typed error if the recovered panic is an error, otherwise formats as error.
|
||||
func errFromPanic(p interface{}) error {
|
||||
if err, ok := p.(error); ok {
|
||||
return err
|
||||
}
|
||||
return fmt.Errorf("panic: %v", p)
|
||||
}
|
||||
|
||||
// internalWithCause is a Twirp Internal error wrapping an original error cause,
|
||||
// but the original error message is not exposed on Msg(). The original error
|
||||
// can be checked with go1.13+ errors.Is/As, and also by (github.com/pkg/errors).Unwrap
|
||||
type internalWithCause struct {
|
||||
msg string
|
||||
cause error
|
||||
}
|
||||
|
||||
func (e *internalWithCause) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As
|
||||
func (e *internalWithCause) Cause() error { return e.cause } // for github.com/pkg/errors
|
||||
func (e *internalWithCause) Error() string { return e.msg + ": " + e.cause.Error() }
|
||||
func (e *internalWithCause) Code() twirp.ErrorCode { return twirp.Internal }
|
||||
func (e *internalWithCause) Msg() string { return e.msg }
|
||||
func (e *internalWithCause) Meta(key string) string { return "" }
|
||||
func (e *internalWithCause) MetaMap() map[string]string { return nil }
|
||||
func (e *internalWithCause) WithMeta(key string, val string) twirp.Error { return e }
|
||||
|
||||
// malformedRequestError is used when the twirp server cannot unmarshal a request
|
||||
func malformedRequestError(msg string) twirp.Error {
|
||||
return twirp.NewError(twirp.Malformed, msg)
|
||||
}
|
||||
|
||||
// badRouteError is used when the twirp server cannot route a request
|
||||
func badRouteError(msg string, method, url string) twirp.Error {
|
||||
err := twirp.NewError(twirp.BadRoute, msg)
|
||||
err = err.WithMeta("twirp_invalid_route", method+" "+url)
|
||||
return err
|
||||
}
|
||||
|
||||
// withoutRedirects makes sure that the POST request can not be redirected.
|
||||
// The standard library will, by default, redirect requests (including POSTs) if it gets a 302 or
|
||||
// 303 response, and also 301s in go1.8. It redirects by making a second request, changing the
|
||||
// method to GET and removing the body. This produces very confusing error messages, so instead we
|
||||
// set a redirect policy that always errors. This stops Go from executing the redirect.
|
||||
//
|
||||
// We have to be a little careful in case the user-provided http.Client has its own CheckRedirect
|
||||
// policy - if so, we'll run through that policy first.
|
||||
//
|
||||
// Because this requires modifying the http.Client, we make a new copy of the client and return it.
|
||||
func withoutRedirects(in *http.Client) *http.Client {
|
||||
copy := *in
|
||||
copy.CheckRedirect = func(req *http.Request, via []*http.Request) error {
|
||||
if in.CheckRedirect != nil {
|
||||
// Run the input's redirect if it exists, in case it has side effects, but ignore any error it
|
||||
// returns, since we want to use ErrUseLastResponse.
|
||||
err := in.CheckRedirect(req, via)
|
||||
_ = err // Silly, but this makes sure generated code passes errcheck -blank, which some people use.
|
||||
}
|
||||
return http.ErrUseLastResponse
|
||||
}
|
||||
return ©
|
||||
}
|
||||
|
||||
// doProtobufRequest makes a Protobuf request to the remote Twirp service.
|
||||
func doProtobufRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) {
|
||||
reqBodyBytes, err := proto.Marshal(in)
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "failed to marshal proto request")
|
||||
}
|
||||
reqBody := bytes.NewBuffer(reqBodyBytes)
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
|
||||
req, err := newRequest(ctx, url, reqBody, "application/protobuf")
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "could not build request")
|
||||
}
|
||||
ctx, err = callClientRequestPrepared(ctx, hooks, req)
|
||||
if err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
|
||||
req = req.WithContext(ctx)
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "failed to do request")
|
||||
}
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return ctx, errorFromResponse(resp)
|
||||
}
|
||||
|
||||
respBodyBytes, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "failed to read response body")
|
||||
}
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
|
||||
if err = proto.Unmarshal(respBodyBytes, out); err != nil {
|
||||
return ctx, wrapInternal(err, "failed to unmarshal proto response")
|
||||
}
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
// doJSONRequest makes a JSON request to the remote Twirp service.
|
||||
func doJSONRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) {
|
||||
marshaler := &protojson.MarshalOptions{UseProtoNames: true}
|
||||
reqBytes, err := marshaler.Marshal(in)
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "failed to marshal json request")
|
||||
}
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
|
||||
req, err := newRequest(ctx, url, bytes.NewReader(reqBytes), "application/json")
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "could not build request")
|
||||
}
|
||||
ctx, err = callClientRequestPrepared(ctx, hooks, req)
|
||||
if err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
|
||||
req = req.WithContext(ctx)
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return ctx, wrapInternal(err, "failed to do request")
|
||||
}
|
||||
|
||||
defer func() {
|
||||
cerr := resp.Body.Close()
|
||||
if err == nil && cerr != nil {
|
||||
err = wrapInternal(cerr, "failed to close response body")
|
||||
}
|
||||
}()
|
||||
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return ctx, errorFromResponse(resp)
|
||||
}
|
||||
|
||||
d := json.NewDecoder(resp.Body)
|
||||
rawRespBody := json.RawMessage{}
|
||||
if err := d.Decode(&rawRespBody); err != nil {
|
||||
return ctx, wrapInternal(err, "failed to unmarshal json response")
|
||||
}
|
||||
unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
|
||||
if err = unmarshaler.Unmarshal(rawRespBody, out); err != nil {
|
||||
return ctx, wrapInternal(err, "failed to unmarshal json response")
|
||||
}
|
||||
if err = ctx.Err(); err != nil {
|
||||
return ctx, wrapInternal(err, "aborted because context was done")
|
||||
}
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
// Call twirp.ServerHooks.RequestReceived if the hook is available
|
||||
func callRequestReceived(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) {
|
||||
if h == nil || h.RequestReceived == nil {
|
||||
return ctx, nil
|
||||
}
|
||||
return h.RequestReceived(ctx)
|
||||
}
|
||||
|
||||
// Call twirp.ServerHooks.RequestRouted if the hook is available
|
||||
func callRequestRouted(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) {
|
||||
if h == nil || h.RequestRouted == nil {
|
||||
return ctx, nil
|
||||
}
|
||||
return h.RequestRouted(ctx)
|
||||
}
|
||||
|
||||
// Call twirp.ServerHooks.ResponsePrepared if the hook is available
|
||||
func callResponsePrepared(ctx context.Context, h *twirp.ServerHooks) context.Context {
|
||||
if h == nil || h.ResponsePrepared == nil {
|
||||
return ctx
|
||||
}
|
||||
return h.ResponsePrepared(ctx)
|
||||
}
|
||||
|
||||
// Call twirp.ServerHooks.ResponseSent if the hook is available
|
||||
func callResponseSent(ctx context.Context, h *twirp.ServerHooks) {
|
||||
if h == nil || h.ResponseSent == nil {
|
||||
return
|
||||
}
|
||||
h.ResponseSent(ctx)
|
||||
}
|
||||
|
||||
// Call twirp.ServerHooks.Error if the hook is available
|
||||
func callError(ctx context.Context, h *twirp.ServerHooks, err twirp.Error) context.Context {
|
||||
if h == nil || h.Error == nil {
|
||||
return ctx
|
||||
}
|
||||
return h.Error(ctx, err)
|
||||
}
|
||||
|
||||
func callClientResponseReceived(ctx context.Context, h *twirp.ClientHooks) {
|
||||
if h == nil || h.ResponseReceived == nil {
|
||||
return
|
||||
}
|
||||
h.ResponseReceived(ctx)
|
||||
}
|
||||
|
||||
func callClientRequestPrepared(ctx context.Context, h *twirp.ClientHooks, req *http.Request) (context.Context, error) {
|
||||
if h == nil || h.RequestPrepared == nil {
|
||||
return ctx, nil
|
||||
}
|
||||
return h.RequestPrepared(ctx, req)
|
||||
}
|
||||
|
||||
func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) {
|
||||
if h == nil || h.Error == nil {
|
||||
return
|
||||
}
|
||||
h.Error(ctx, err)
|
||||
}
|
||||
|
||||
var twirpFileDescriptor0 = []byte{
|
||||
var twirpFileDescriptor1 = []byte{
|
||||
// 2990 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4b, 0x73, 0xdb, 0xd6,
|
||||
0xf5, 0x17, 0xc0, 0x17, 0x78, 0xf8, 0x10, 0x74, 0x2d, 0x3b, 0xb4, 0x9c, 0x7f, 0xac, 0xd0, 0x79,
|
||||
|
||||
@@ -1341,7 +1341,7 @@ func (s *ingressServer) serveDeleteIngressProtobuf(ctx context.Context, resp htt
|
||||
}
|
||||
|
||||
func (s *ingressServer) ServiceDescriptor() ([]byte, int) {
|
||||
return twirpFileDescriptor1, 0
|
||||
return twirpFileDescriptor2, 0
|
||||
}
|
||||
|
||||
func (s *ingressServer) ProtocGenTwirpVersion() string {
|
||||
@@ -1355,7 +1355,7 @@ func (s *ingressServer) PathPrefix() string {
|
||||
return baseServicePath(s.pathPrefix, "livekit", "Ingress")
|
||||
}
|
||||
|
||||
var twirpFileDescriptor1 = []byte{
|
||||
var twirpFileDescriptor2 = []byte{
|
||||
// 1453 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0xdb, 0x46,
|
||||
0x13, 0x36, 0x25, 0xeb, 0x6b, 0x14, 0xc9, 0xca, 0x5a, 0x4e, 0x18, 0x7f, 0xe0, 0x35, 0x94, 0xbc,
|
||||
|
||||
@@ -3307,7 +3307,7 @@ func (s *roomServiceServer) serveUpdateRoomMetadataProtobuf(ctx context.Context,
|
||||
}
|
||||
|
||||
func (s *roomServiceServer) ServiceDescriptor() ([]byte, int) {
|
||||
return twirpFileDescriptor2, 0
|
||||
return twirpFileDescriptor3, 0
|
||||
}
|
||||
|
||||
func (s *roomServiceServer) ProtocGenTwirpVersion() string {
|
||||
@@ -3321,7 +3321,7 @@ func (s *roomServiceServer) PathPrefix() string {
|
||||
return baseServicePath(s.pathPrefix, "livekit", "RoomService")
|
||||
}
|
||||
|
||||
var twirpFileDescriptor2 = []byte{
|
||||
var twirpFileDescriptor3 = []byte{
|
||||
// 1277 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x5b, 0x73, 0xdb, 0x44,
|
||||
0x14, 0x46, 0x8e, 0xed, 0x5a, 0xc7, 0xb9, 0x79, 0x9b, 0x52, 0x45, 0x69, 0x4b, 0xaa, 0xc0, 0x60,
|
||||
|
||||
@@ -3292,7 +3292,7 @@ func (s *sIPServer) serveCreateSIPParticipantProtobuf(ctx context.Context, resp
|
||||
}
|
||||
|
||||
func (s *sIPServer) ServiceDescriptor() ([]byte, int) {
|
||||
return twirpFileDescriptor3, 0
|
||||
return twirpFileDescriptor4, 0
|
||||
}
|
||||
|
||||
func (s *sIPServer) ProtocGenTwirpVersion() string {
|
||||
@@ -3306,7 +3306,7 @@ func (s *sIPServer) PathPrefix() string {
|
||||
return baseServicePath(s.pathPrefix, "livekit", "SIP")
|
||||
}
|
||||
|
||||
var twirpFileDescriptor3 = []byte{
|
||||
var twirpFileDescriptor4 = []byte{
|
||||
// 1547 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdb, 0x6e, 0xdb, 0x46,
|
||||
0x13, 0xb6, 0xa8, 0x83, 0xa5, 0xb1, 0x2d, 0xcb, 0xeb, 0x03, 0x18, 0xd9, 0x4e, 0x0c, 0x26, 0xfe,
|
||||
|
||||
+2
-1
@@ -43,6 +43,7 @@ func Bootstrap() error {
|
||||
// regenerate protobuf
|
||||
func Proto() error {
|
||||
twirpProtoFiles := []string{
|
||||
"livekit_agent_dispatch.proto",
|
||||
"livekit_egress.proto",
|
||||
"livekit_ingress.proto",
|
||||
"livekit_room.proto",
|
||||
@@ -50,7 +51,6 @@ func Proto() error {
|
||||
}
|
||||
protoFiles := []string{
|
||||
"livekit_agent.proto",
|
||||
"livekit_agent_dispatch.proto",
|
||||
"livekit_analytics.proto",
|
||||
"livekit_internal.proto",
|
||||
"livekit_models.proto",
|
||||
@@ -63,6 +63,7 @@ func Proto() error {
|
||||
}
|
||||
psrpcProtoFiles := []string{
|
||||
"rpc/agent.proto",
|
||||
"rpc/agent_dispatch.proto",
|
||||
"rpc/egress.proto",
|
||||
"rpc/ingress.proto",
|
||||
"rpc/io.proto",
|
||||
|
||||
@@ -39,6 +39,7 @@ message JobState {
|
||||
int64 started_at = 3;
|
||||
int64 ended_at = 4;
|
||||
int64 updated_at = 5;
|
||||
string participant_identity = 6;
|
||||
}
|
||||
|
||||
// from Worker to Server
|
||||
|
||||
@@ -24,7 +24,7 @@ import "livekit_agent.proto";
|
||||
service AgentDispatchService {
|
||||
rpc CreateDispatch(CreateAgentDispatchRequest) returns (AgentDispatch);
|
||||
rpc DeleteDispatch(DeleteAgentDispatchRequest) returns (AgentDispatch);
|
||||
rpc ListDispatch(ListAgentDispatchRequesst) returns (ListAgentDispatchResponse);
|
||||
rpc ListDispatch(ListAgentDispatchRequest) returns (ListAgentDispatchResponse);
|
||||
}
|
||||
|
||||
message CreateAgentDispatchRequest {
|
||||
@@ -40,9 +40,10 @@ message RoomAgentDispatch {
|
||||
|
||||
message DeleteAgentDispatchRequest {
|
||||
string dispatch_id = 1;
|
||||
string room = 2;
|
||||
}
|
||||
|
||||
message ListAgentDispatchRequesst {
|
||||
message ListAgentDispatchRequest {
|
||||
string dispatch_id = 1; // if set, only the dispatch whose id is given will be returned
|
||||
string room = 2; // name of the room to list agents for. Must be set.
|
||||
}
|
||||
|
||||
@@ -36,6 +36,15 @@ service AgentInternal {
|
||||
}
|
||||
};
|
||||
};
|
||||
rpc JobTerminate(JobTerminateRequest) returns (JobTerminateResponse) {
|
||||
option (psrpc.options) = {
|
||||
topics: true
|
||||
topic_params: {
|
||||
names: ["job_id"]
|
||||
typed: false
|
||||
}
|
||||
};
|
||||
}
|
||||
rpc WorkerRegistered(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
||||
option (psrpc.options) = {
|
||||
subscription: true
|
||||
@@ -46,7 +55,12 @@ service AgentInternal {
|
||||
typed: false
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
enum JobTerminateReason {
|
||||
TERINATION_REQUESTED = 0;
|
||||
AGENT_LEFT_ROOM = 1;
|
||||
}
|
||||
|
||||
message CheckEnabledRequest{}
|
||||
@@ -61,3 +75,13 @@ message CheckEnabledResponse {
|
||||
message JobRequestResponse {
|
||||
livekit.JobState state = 1;
|
||||
}
|
||||
|
||||
message JobTerminateRequest {
|
||||
string job_id = 1;
|
||||
JobTerminateReason reason = 2;
|
||||
}
|
||||
|
||||
message JobTerminateResponse {
|
||||
livekit.JobState state = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
// Copyright 2023 LiveKit, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package rpc;
|
||||
|
||||
option go_package = "github.com/livekit/protocol/rpc";
|
||||
|
||||
import "options.proto";
|
||||
import "livekit_agent_dispatch.proto";
|
||||
|
||||
service AgentDispatchInternal {
|
||||
rpc CreateDispatch(livekit.CreateAgentDispatchRequest) returns (livekit.AgentDispatch) {
|
||||
option (psrpc.options) = {
|
||||
topics: true
|
||||
topic_params: {
|
||||
group: "room"
|
||||
names: ["room"]
|
||||
typed: true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rpc DeleteDispatch(livekit.DeleteAgentDispatchRequest) returns (livekit.AgentDispatch) {
|
||||
option (psrpc.options) = {
|
||||
topics: true
|
||||
topic_params: {
|
||||
group: "room"
|
||||
names: ["room"]
|
||||
typed: true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rpc ListDispatch(livekit.ListAgentDispatchRequest) returns (livekit.ListAgentDispatchResponse) {
|
||||
option (psrpc.options) = {
|
||||
topics: true
|
||||
topic_params: {
|
||||
group: "room"
|
||||
names: ["room"]
|
||||
typed: true
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
+11
-11
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.3
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.27.1
|
||||
// source: cloud_replay.proto
|
||||
|
||||
package replay
|
||||
@@ -491,7 +491,7 @@ func file_cloud_replay_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_cloud_replay_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_cloud_replay_proto_goTypes = []interface{}{
|
||||
var file_cloud_replay_proto_goTypes = []any{
|
||||
(*ListReplaysRequest)(nil), // 0: replay.ListReplaysRequest
|
||||
(*ListReplaysResponse)(nil), // 1: replay.ListReplaysResponse
|
||||
(*ReplayInfo)(nil), // 2: replay.ReplayInfo
|
||||
@@ -527,7 +527,7 @@ func file_cloud_replay_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_cloud_replay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ListReplaysRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -539,7 +539,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ListReplaysResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -551,7 +551,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReplayInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -563,7 +563,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*LoadReplayRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -575,7 +575,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*LoadReplayResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -587,7 +587,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RoomSeekRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -599,7 +599,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*CloseReplayRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -611,7 +611,7 @@ func file_cloud_replay_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_cloud_replay_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_cloud_replay_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*DeleteReplayRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
||||
+243
-42
@@ -37,6 +37,52 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type JobTerminateReason int32
|
||||
|
||||
const (
|
||||
JobTerminateReason_TERINATION_REQUESTED JobTerminateReason = 0
|
||||
JobTerminateReason_AGENT_LEFT_ROOM JobTerminateReason = 1
|
||||
)
|
||||
|
||||
// Enum value maps for JobTerminateReason.
|
||||
var (
|
||||
JobTerminateReason_name = map[int32]string{
|
||||
0: "TERINATION_REQUESTED",
|
||||
1: "AGENT_LEFT_ROOM",
|
||||
}
|
||||
JobTerminateReason_value = map[string]int32{
|
||||
"TERINATION_REQUESTED": 0,
|
||||
"AGENT_LEFT_ROOM": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x JobTerminateReason) Enum() *JobTerminateReason {
|
||||
p := new(JobTerminateReason)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x JobTerminateReason) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (JobTerminateReason) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_rpc_agent_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (JobTerminateReason) Type() protoreflect.EnumType {
|
||||
return &file_rpc_agent_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x JobTerminateReason) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JobTerminateReason.Descriptor instead.
|
||||
func (JobTerminateReason) EnumDescriptor() ([]byte, []int) {
|
||||
return file_rpc_agent_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type CheckEnabledRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -195,6 +241,108 @@ func (x *JobRequestResponse) GetState() *livekit.JobState {
|
||||
return nil
|
||||
}
|
||||
|
||||
type JobTerminateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
|
||||
Reason JobTerminateReason `protobuf:"varint,2,opt,name=reason,proto3,enum=rpc.JobTerminateReason" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JobTerminateRequest) Reset() {
|
||||
*x = JobTerminateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_agent_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JobTerminateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JobTerminateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *JobTerminateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_agent_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JobTerminateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*JobTerminateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_agent_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *JobTerminateRequest) GetJobId() string {
|
||||
if x != nil {
|
||||
return x.JobId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JobTerminateRequest) GetReason() JobTerminateReason {
|
||||
if x != nil {
|
||||
return x.Reason
|
||||
}
|
||||
return JobTerminateReason_TERINATION_REQUESTED
|
||||
}
|
||||
|
||||
type JobTerminateResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
State *livekit.JobState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JobTerminateResponse) Reset() {
|
||||
*x = JobTerminateResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_agent_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JobTerminateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JobTerminateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *JobTerminateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_agent_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JobTerminateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*JobTerminateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_agent_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *JobTerminateResponse) GetState() *livekit.JobState {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_agent_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_agent_proto_rawDesc = []byte{
|
||||
@@ -219,27 +367,47 @@ var file_rpc_agent_proto_rawDesc = []byte{
|
||||
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x32, 0x97, 0x02, 0x0a, 0x0d,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x4b, 0x0a,
|
||||
0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x2e,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x28, 0x01, 0x12, 0x54, 0x0a, 0x0a, 0x4a, 0x6f,
|
||||
0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||
0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x1a, 0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4a, 0x6f, 0x62,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x1f, 0xb2, 0x89, 0x01, 0x1b, 0x10, 0x01, 0x1a, 0x15, 0x12, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x12, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x30, 0x01,
|
||||
0x12, 0x63, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x65, 0x72, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0xb2, 0x89, 0x01, 0x1b, 0x08, 0x01, 0x10, 0x01, 0x1a, 0x13,
|
||||
0x12, 0x11, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x28, 0x01, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x0a, 0x13, 0x4a,
|
||||
0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x61,
|
||||
0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x4a, 0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73,
|
||||
0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x14, 0x4a, 0x6f,
|
||||
0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x43, 0x0a, 0x12, 0x4a,
|
||||
0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f,
|
||||
0x6e, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x45, 0x52, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
|
||||
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41,
|
||||
0x47, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x10, 0x01,
|
||||
0x32, 0xee, 0x02, 0x0a, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e,
|
||||
0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x28, 0x01, 0x12,
|
||||
0x54, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x62, 0x1a, 0x17, 0x2e, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xb2, 0x89, 0x01, 0x1b, 0x10, 0x01, 0x1a, 0x15, 0x12, 0x09,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x74,
|
||||
0x79, 0x70, 0x65, 0x30, 0x01, 0x12, 0x55, 0x0a, 0x0c, 0x4a, 0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4a, 0x6f, 0x62, 0x54,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0xb2, 0x89, 0x01, 0x0c,
|
||||
0x10, 0x01, 0x1a, 0x08, 0x12, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x12, 0x63, 0x0a, 0x10,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64,
|
||||
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
|
||||
0x22, 0x1f, 0xb2, 0x89, 0x01, 0x1b, 0x08, 0x01, 0x10, 0x01, 0x1a, 0x13, 0x12, 0x11, 0x68, 0x61,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x28,
|
||||
0x01, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -254,28 +422,36 @@ func file_rpc_agent_proto_rawDescGZIP() []byte {
|
||||
return file_rpc_agent_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_rpc_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_rpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_rpc_agent_proto_goTypes = []any{
|
||||
(*CheckEnabledRequest)(nil), // 0: rpc.CheckEnabledRequest
|
||||
(*CheckEnabledResponse)(nil), // 1: rpc.CheckEnabledResponse
|
||||
(*JobRequestResponse)(nil), // 2: rpc.JobRequestResponse
|
||||
(*livekit.JobState)(nil), // 3: livekit.JobState
|
||||
(*livekit.Job)(nil), // 4: livekit.Job
|
||||
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
|
||||
(JobTerminateReason)(0), // 0: rpc.JobTerminateReason
|
||||
(*CheckEnabledRequest)(nil), // 1: rpc.CheckEnabledRequest
|
||||
(*CheckEnabledResponse)(nil), // 2: rpc.CheckEnabledResponse
|
||||
(*JobRequestResponse)(nil), // 3: rpc.JobRequestResponse
|
||||
(*JobTerminateRequest)(nil), // 4: rpc.JobTerminateRequest
|
||||
(*JobTerminateResponse)(nil), // 5: rpc.JobTerminateResponse
|
||||
(*livekit.JobState)(nil), // 6: livekit.JobState
|
||||
(*livekit.Job)(nil), // 7: livekit.Job
|
||||
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
|
||||
}
|
||||
var file_rpc_agent_proto_depIdxs = []int32{
|
||||
3, // 0: rpc.JobRequestResponse.state:type_name -> livekit.JobState
|
||||
0, // 1: rpc.AgentInternal.CheckEnabled:input_type -> rpc.CheckEnabledRequest
|
||||
4, // 2: rpc.AgentInternal.JobRequest:input_type -> livekit.Job
|
||||
5, // 3: rpc.AgentInternal.WorkerRegistered:input_type -> google.protobuf.Empty
|
||||
1, // 4: rpc.AgentInternal.CheckEnabled:output_type -> rpc.CheckEnabledResponse
|
||||
2, // 5: rpc.AgentInternal.JobRequest:output_type -> rpc.JobRequestResponse
|
||||
5, // 6: rpc.AgentInternal.WorkerRegistered:output_type -> google.protobuf.Empty
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
6, // 0: rpc.JobRequestResponse.state:type_name -> livekit.JobState
|
||||
0, // 1: rpc.JobTerminateRequest.reason:type_name -> rpc.JobTerminateReason
|
||||
6, // 2: rpc.JobTerminateResponse.state:type_name -> livekit.JobState
|
||||
1, // 3: rpc.AgentInternal.CheckEnabled:input_type -> rpc.CheckEnabledRequest
|
||||
7, // 4: rpc.AgentInternal.JobRequest:input_type -> livekit.Job
|
||||
4, // 5: rpc.AgentInternal.JobTerminate:input_type -> rpc.JobTerminateRequest
|
||||
8, // 6: rpc.AgentInternal.WorkerRegistered:input_type -> google.protobuf.Empty
|
||||
2, // 7: rpc.AgentInternal.CheckEnabled:output_type -> rpc.CheckEnabledResponse
|
||||
3, // 8: rpc.AgentInternal.JobRequest:output_type -> rpc.JobRequestResponse
|
||||
5, // 9: rpc.AgentInternal.JobTerminate:output_type -> rpc.JobTerminateResponse
|
||||
8, // 10: rpc.AgentInternal.WorkerRegistered:output_type -> google.protobuf.Empty
|
||||
7, // [7:11] is the sub-list for method output_type
|
||||
3, // [3:7] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_agent_proto_init() }
|
||||
@@ -320,19 +496,44 @@ func file_rpc_agent_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_agent_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*JobTerminateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_agent_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*JobTerminateResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_agent_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumEnums: 1,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_rpc_agent_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_agent_proto_depIdxs,
|
||||
EnumInfos: file_rpc_agent_proto_enumTypes,
|
||||
MessageInfos: file_rpc_agent_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_agent_proto = out.File
|
||||
|
||||
+55
-27
@@ -27,6 +27,8 @@ type AgentInternalClient interface {
|
||||
|
||||
JobRequest(ctx context.Context, namespace string, jobType string, req *livekit1.Job, opts ...psrpc.RequestOption) (*JobRequestResponse, error)
|
||||
|
||||
JobTerminate(ctx context.Context, jobId string, req *JobTerminateRequest, opts ...psrpc.RequestOption) (*JobTerminateResponse, error)
|
||||
|
||||
SubscribeWorkerRegistered(ctx context.Context, handlerNamespace string) (psrpc.Subscription[*google_protobuf.Empty], error)
|
||||
}
|
||||
|
||||
@@ -39,6 +41,8 @@ type AgentInternalServerImpl interface {
|
||||
|
||||
JobRequest(context.Context, *livekit1.Job) (*JobRequestResponse, error)
|
||||
JobRequestAffinity(context.Context, *livekit1.Job) float32
|
||||
|
||||
JobTerminate(context.Context, *JobTerminateRequest) (*JobTerminateResponse, error)
|
||||
}
|
||||
|
||||
// ==============================
|
||||
@@ -48,6 +52,8 @@ type AgentInternalServerImpl interface {
|
||||
type AgentInternalServer interface {
|
||||
RegisterJobRequestTopic(namespace string, jobType string) error
|
||||
DeregisterJobRequestTopic(namespace string, jobType string)
|
||||
RegisterJobTerminateTopic(jobId string) error
|
||||
DeregisterJobTerminateTopic(jobId string)
|
||||
PublishWorkerRegistered(ctx context.Context, handlerNamespace string, msg *google_protobuf.Empty) error
|
||||
|
||||
// Close and wait for pending RPCs to complete
|
||||
@@ -74,6 +80,7 @@ func NewAgentInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (A
|
||||
|
||||
sd.RegisterMethod("CheckEnabled", false, true, false, false)
|
||||
sd.RegisterMethod("JobRequest", true, false, true, false)
|
||||
sd.RegisterMethod("JobTerminate", false, false, true, true)
|
||||
sd.RegisterMethod("WorkerRegistered", false, true, false, false)
|
||||
|
||||
rpcClient, err := client.NewRPCClient(sd, bus, opts...)
|
||||
@@ -94,6 +101,10 @@ func (c *agentInternalClient) JobRequest(ctx context.Context, namespace string,
|
||||
return client.RequestSingle[*JobRequestResponse](ctx, c.client, "JobRequest", []string{namespace, jobType}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *agentInternalClient) JobTerminate(ctx context.Context, jobId string, req *JobTerminateRequest, opts ...psrpc.RequestOption) (*JobTerminateResponse, error) {
|
||||
return client.RequestSingle[*JobTerminateResponse](ctx, c.client, "JobTerminate", []string{jobId}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *agentInternalClient) SubscribeWorkerRegistered(ctx context.Context, handlerNamespace string) (psrpc.Subscription[*google_protobuf.Empty], error) {
|
||||
return client.Join[*google_protobuf.Empty](ctx, c.client, "WorkerRegistered", []string{handlerNamespace})
|
||||
}
|
||||
@@ -126,6 +137,7 @@ func NewAgentInternalServer(svc AgentInternalServerImpl, bus psrpc.MessageBus, o
|
||||
}
|
||||
|
||||
sd.RegisterMethod("JobRequest", true, false, true, false)
|
||||
sd.RegisterMethod("JobTerminate", false, false, true, true)
|
||||
sd.RegisterMethod("WorkerRegistered", false, true, false, false)
|
||||
return &agentInternalServer{
|
||||
svc: svc,
|
||||
@@ -141,6 +153,14 @@ func (s *agentInternalServer) DeregisterJobRequestTopic(namespace string, jobTyp
|
||||
s.rpc.DeregisterHandler("JobRequest", []string{namespace, jobType})
|
||||
}
|
||||
|
||||
func (s *agentInternalServer) RegisterJobTerminateTopic(jobId string) error {
|
||||
return server.RegisterHandler(s.rpc, "JobTerminate", []string{jobId}, s.svc.JobTerminate, nil)
|
||||
}
|
||||
|
||||
func (s *agentInternalServer) DeregisterJobTerminateTopic(jobId string) {
|
||||
s.rpc.DeregisterHandler("JobTerminate", []string{jobId})
|
||||
}
|
||||
|
||||
func (s *agentInternalServer) PublishWorkerRegistered(ctx context.Context, handlerNamespace string, msg *google_protobuf.Empty) error {
|
||||
return s.rpc.Publish(ctx, "WorkerRegistered", []string{handlerNamespace}, msg)
|
||||
}
|
||||
@@ -154,31 +174,39 @@ func (s *agentInternalServer) Kill() {
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor0 = []byte{
|
||||
// 413 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x6f, 0xd3, 0x30,
|
||||
0x14, 0xc7, 0xe5, 0x76, 0xa0, 0xee, 0xb5, 0x13, 0xad, 0xcb, 0x20, 0x04, 0xa1, 0xad, 0xb9, 0x50,
|
||||
0x09, 0xc9, 0x41, 0xe3, 0x8c, 0x34, 0x86, 0x76, 0x60, 0x12, 0x1c, 0x82, 0x04, 0x12, 0x97, 0x28,
|
||||
0x76, 0x1f, 0x69, 0x68, 0x62, 0x1b, 0xdb, 0x41, 0xda, 0x47, 0xd8, 0x87, 0xe0, 0x13, 0x70, 0xdb,
|
||||
0x27, 0x44, 0x71, 0xb2, 0x10, 0x44, 0x39, 0xfa, 0xf7, 0xfe, 0x7a, 0xef, 0xe7, 0xa7, 0x07, 0x0f,
|
||||
0x8c, 0x16, 0x71, 0x96, 0xa3, 0x74, 0x4c, 0x1b, 0xe5, 0x14, 0x1d, 0x1b, 0x2d, 0xc2, 0xa7, 0xb9,
|
||||
0x52, 0x79, 0x89, 0xb1, 0x47, 0xbc, 0xfe, 0x1a, 0x63, 0xa5, 0xdd, 0x75, 0x9b, 0x08, 0x8f, 0x94,
|
||||
0x76, 0x85, 0x92, 0xb6, 0x7b, 0x2e, 0xcb, 0xe2, 0x07, 0xee, 0x0a, 0x97, 0x0e, 0xba, 0x44, 0xc7,
|
||||
0xb0, 0x7c, 0xbb, 0x45, 0xb1, 0xbb, 0x94, 0x19, 0x2f, 0x71, 0x93, 0xe0, 0xf7, 0x1a, 0xad, 0x8b,
|
||||
0x7e, 0x11, 0x78, 0xf8, 0x37, 0xb7, 0x5a, 0x49, 0x8b, 0x74, 0x05, 0x33, 0xa3, 0x54, 0x95, 0x62,
|
||||
0xcb, 0x03, 0x72, 0x4a, 0xd6, 0x93, 0x64, 0xda, 0xb0, 0x2e, 0x4a, 0x5f, 0xc0, 0x42, 0xd7, 0xbc,
|
||||
0x2c, 0xec, 0x16, 0x4d, 0x9f, 0x1b, 0xf9, 0xdc, 0xbc, 0x2f, 0xdc, 0x85, 0x23, 0x00, 0x99, 0x55,
|
||||
0x68, 0x75, 0x26, 0xd0, 0x06, 0xe3, 0xd3, 0xf1, 0xfa, 0xf0, 0x62, 0x14, 0x90, 0x64, 0x40, 0xe9,
|
||||
0x09, 0x4c, 0xbd, 0x72, 0xea, 0x59, 0x70, 0xd0, 0x84, 0x12, 0xf0, 0xe8, 0x43, 0x43, 0xa2, 0xd7,
|
||||
0x40, 0xaf, 0x14, 0xef, 0xdc, 0x7b, 0xd5, 0xe7, 0x70, 0xcf, 0xba, 0xcc, 0xa1, 0x77, 0x9c, 0x9e,
|
||||
0x2d, 0x58, 0xf7, 0x7f, 0x76, 0xa5, 0xf8, 0xc7, 0xa6, 0x90, 0xb4, 0xf5, 0xb3, 0x9f, 0x23, 0x38,
|
||||
0x7a, 0xd3, 0x74, 0x7b, 0x27, 0x1d, 0x1a, 0x99, 0x95, 0xf4, 0x3d, 0xcc, 0x86, 0xbf, 0xa7, 0x01,
|
||||
0x33, 0x5a, 0xb0, 0x3d, 0x8b, 0x0a, 0x9f, 0xec, 0xa9, 0xb4, 0xf3, 0xa3, 0xc9, 0xed, 0x0d, 0x39,
|
||||
0x38, 0x1f, 0xad, 0x09, 0xfd, 0x04, 0xf0, 0xc7, 0x8f, 0xce, 0x86, 0x22, 0xe1, 0x63, 0xdf, 0xe0,
|
||||
0x5f, 0xfd, 0x68, 0x75, 0x7b, 0x43, 0x9e, 0xcd, 0x49, 0x78, 0x4c, 0x0f, 0xfb, 0x5d, 0xd0, 0xc9,
|
||||
0x37, 0xc5, 0x53, 0x77, 0xad, 0xf1, 0x9c, 0xbc, 0x24, 0x14, 0x61, 0xfe, 0x59, 0x99, 0x1d, 0x9a,
|
||||
0x04, 0xf3, 0xc2, 0x3a, 0x34, 0xb8, 0xa1, 0x8f, 0x58, 0x7b, 0x12, 0xec, 0xee, 0x24, 0xd8, 0x65,
|
||||
0x73, 0x12, 0xe1, 0x7f, 0x78, 0x3b, 0x66, 0x42, 0xe6, 0x24, 0x5c, 0xd2, 0xc5, 0x36, 0x93, 0x9b,
|
||||
0x12, 0x4d, 0xda, 0x0f, 0x6c, 0xf4, 0x2f, 0x56, 0x5f, 0x4e, 0xf2, 0xc2, 0x6d, 0x6b, 0xce, 0x84,
|
||||
0xaa, 0xe2, 0x4e, 0xbe, 0x3d, 0x39, 0xa1, 0xca, 0xd8, 0x68, 0xc1, 0xef, 0xfb, 0xd7, 0xab, 0xdf,
|
||||
0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xf2, 0x9b, 0x08, 0xa6, 0x02, 0x00, 0x00,
|
||||
// 544 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5f, 0x6f, 0xd2, 0x50,
|
||||
0x14, 0xf7, 0xc2, 0x46, 0xe0, 0xc0, 0x5c, 0xb9, 0x80, 0xd6, 0x1a, 0xb3, 0xd1, 0x17, 0x89, 0x26,
|
||||
0xad, 0xc1, 0x67, 0xe3, 0xd8, 0xac, 0x06, 0xe2, 0x20, 0x76, 0x9d, 0x26, 0x26, 0xa6, 0x69, 0xcb,
|
||||
0x11, 0x3a, 0x4a, 0x6f, 0xbd, 0xbd, 0x98, 0xec, 0x23, 0xf0, 0x59, 0x7c, 0xe3, 0xb3, 0xf9, 0x01,
|
||||
0x4c, 0xff, 0xac, 0xc2, 0x82, 0x0f, 0x3e, 0xde, 0xdf, 0xf9, 0xe5, 0xe4, 0xf7, 0xe7, 0x1e, 0x38,
|
||||
0xe6, 0x91, 0xa7, 0x3b, 0x33, 0x0c, 0x85, 0x16, 0x71, 0x26, 0x18, 0x2d, 0xf3, 0xc8, 0x53, 0x9e,
|
||||
0xce, 0x18, 0x9b, 0x05, 0xa8, 0xa7, 0x90, 0xbb, 0xfa, 0xae, 0xe3, 0x32, 0x12, 0xb7, 0x19, 0x43,
|
||||
0x39, 0x62, 0x91, 0xf0, 0x59, 0x18, 0xe7, 0xcf, 0x56, 0xe0, 0xff, 0xc4, 0x85, 0x2f, 0xec, 0xad,
|
||||
0x2d, 0x6a, 0x07, 0x5a, 0x17, 0x73, 0xf4, 0x16, 0x46, 0xe8, 0xb8, 0x01, 0x4e, 0x4d, 0xfc, 0xb1,
|
||||
0xc2, 0x58, 0xa8, 0xbf, 0x08, 0xb4, 0x77, 0xf1, 0x38, 0x62, 0x61, 0x8c, 0xb4, 0x0b, 0x0d, 0xce,
|
||||
0xd8, 0xd2, 0xc6, 0x0c, 0x97, 0xc9, 0x29, 0xe9, 0x55, 0xcd, 0x7a, 0x82, 0xe5, 0x54, 0xfa, 0x12,
|
||||
0x9a, 0xd1, 0xca, 0x0d, 0xfc, 0x78, 0x8e, 0xbc, 0xe0, 0x95, 0x52, 0x9e, 0x54, 0x0c, 0xee, 0xc8,
|
||||
0x2a, 0x40, 0xe8, 0x2c, 0x31, 0x8e, 0x1c, 0x0f, 0x63, 0xb9, 0x7c, 0x5a, 0xee, 0xd5, 0xce, 0x4b,
|
||||
0x32, 0x31, 0xb7, 0x50, 0x7a, 0x02, 0xf5, 0x54, 0xb2, 0x9d, 0x62, 0xf2, 0x41, 0x42, 0x32, 0x21,
|
||||
0x85, 0xc6, 0x09, 0xa2, 0xbe, 0x01, 0x3a, 0x62, 0x6e, 0xae, 0xbd, 0x90, 0xfa, 0x1c, 0x0e, 0x63,
|
||||
0xe1, 0x08, 0x4c, 0x35, 0xd6, 0xfb, 0x4d, 0x2d, 0xf7, 0xaf, 0x8d, 0x98, 0x7b, 0x95, 0x0c, 0xcc,
|
||||
0x6c, 0xae, 0x7e, 0x83, 0xd6, 0x88, 0xb9, 0x16, 0xf2, 0xa5, 0x1f, 0x26, 0x70, 0xb6, 0x87, 0x76,
|
||||
0xa0, 0x72, 0xc3, 0x5c, 0xdb, 0xcf, 0x4c, 0xd6, 0xcc, 0xc3, 0x1b, 0xe6, 0x0e, 0xa7, 0x54, 0x87,
|
||||
0x0a, 0x47, 0x27, 0x66, 0x61, 0xea, 0xe9, 0x61, 0xff, 0xb1, 0xc6, 0x23, 0x4f, 0xdb, 0x5d, 0x90,
|
||||
0x8c, 0xcd, 0x9c, 0xa6, 0xbe, 0x85, 0xf6, 0xee, 0xf4, 0x3f, 0xf5, 0xbd, 0xb8, 0x48, 0xed, 0xdd,
|
||||
0x5b, 0x4f, 0x65, 0x68, 0x5b, 0x86, 0x39, 0x1c, 0x0f, 0xac, 0xe1, 0x64, 0x6c, 0x9b, 0xc6, 0xa7,
|
||||
0x6b, 0xe3, 0xca, 0x32, 0xde, 0x49, 0x0f, 0x68, 0x0b, 0x8e, 0x07, 0x1f, 0x8c, 0xb1, 0x65, 0x7f,
|
||||
0x34, 0xde, 0x5b, 0xb6, 0x39, 0x99, 0x5c, 0x4a, 0xa4, 0xff, 0xbb, 0x04, 0x47, 0x83, 0x24, 0xb2,
|
||||
0x61, 0x28, 0x90, 0x87, 0x4e, 0x40, 0x2f, 0xa1, 0xb1, 0x5d, 0x31, 0x95, 0x53, 0x23, 0x7b, 0x7e,
|
||||
0x83, 0xf2, 0x64, 0xcf, 0x24, 0x33, 0xa1, 0x56, 0x37, 0x6b, 0x72, 0x70, 0x56, 0xea, 0x11, 0xfa,
|
||||
0x19, 0xe0, 0x6f, 0x09, 0xb4, 0xb1, 0xed, 0x46, 0x29, 0x32, 0xba, 0xd7, 0x91, 0xda, 0xdd, 0xac,
|
||||
0xc9, 0x33, 0x89, 0x28, 0x1d, 0x5a, 0x2b, 0x0a, 0xa7, 0xd5, 0x24, 0x76, 0x71, 0x1b, 0xe1, 0x19,
|
||||
0x79, 0x45, 0xe8, 0x35, 0x34, 0xb6, 0xdd, 0xe7, 0x32, 0xf7, 0x14, 0x96, 0xcb, 0xdc, 0x97, 0xb5,
|
||||
0x2a, 0x6d, 0xd6, 0xa4, 0x21, 0x11, 0xa5, 0x4a, 0xf3, 0x4e, 0x29, 0x82, 0xf4, 0x85, 0xf1, 0x05,
|
||||
0x72, 0x13, 0x67, 0x7e, 0x2c, 0x90, 0xe3, 0x94, 0x3e, 0xd2, 0xb2, 0x73, 0xd2, 0xee, 0xce, 0x49,
|
||||
0x33, 0x92, 0x73, 0x52, 0xfe, 0x81, 0x67, 0xea, 0xab, 0x44, 0x22, 0x4a, 0x8b, 0x36, 0xe7, 0x4e,
|
||||
0x38, 0x0d, 0x90, 0xdb, 0x85, 0x8f, 0x24, 0x95, 0xf3, 0xee, 0xd7, 0x93, 0x99, 0x2f, 0xe6, 0x2b,
|
||||
0x57, 0xf3, 0xd8, 0x52, 0xcf, 0x33, 0xc9, 0xce, 0xd5, 0x63, 0x81, 0xce, 0x23, 0xcf, 0xad, 0xa4,
|
||||
0xaf, 0xd7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xb5, 0x90, 0x87, 0xe2, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright 2023 LiveKit, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v4.23.4
|
||||
// source: rpc/agent_dispatch.proto
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
livekit "github.com/livekit/protocol/livekit"
|
||||
_ "github.com/livekit/psrpc/protoc-gen-psrpc/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_rpc_agent_dispatch_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_agent_dispatch_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x72, 0x70, 0x63, 0x1a,
|
||||
0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd4, 0x02, 0x0a,
|
||||
0x15, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e,
|
||||
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x65, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b,
|
||||
0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73,
|
||||
0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x16, 0xb2, 0x89, 0x01, 0x12, 0x10, 0x01, 0x1a, 0x0e, 0x0a,
|
||||
0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x12, 0x65, 0x0a,
|
||||
0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12,
|
||||
0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x16, 0xb2, 0x89,
|
||||
0x01, 0x12, 0x10, 0x01, 0x1a, 0x0e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x04, 0x72, 0x6f,
|
||||
0x6f, 0x6d, 0x18, 0x01, 0x12, 0x6d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70,
|
||||
0x61, 0x74, 0x63, 0x68, 0x12, 0x21, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61,
|
||||
0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0xb2, 0x89, 0x01,
|
||||
0x12, 0x10, 0x01, 0x1a, 0x0e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x04, 0x72, 0x6f, 0x6f,
|
||||
0x6d, 0x18, 0x01, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_rpc_agent_dispatch_proto_goTypes = []any{
|
||||
(*livekit.CreateAgentDispatchRequest)(nil), // 0: livekit.CreateAgentDispatchRequest
|
||||
(*livekit.DeleteAgentDispatchRequest)(nil), // 1: livekit.DeleteAgentDispatchRequest
|
||||
(*livekit.ListAgentDispatchRequest)(nil), // 2: livekit.ListAgentDispatchRequest
|
||||
(*livekit.AgentDispatch)(nil), // 3: livekit.AgentDispatch
|
||||
(*livekit.ListAgentDispatchResponse)(nil), // 4: livekit.ListAgentDispatchResponse
|
||||
}
|
||||
var file_rpc_agent_dispatch_proto_depIdxs = []int32{
|
||||
0, // 0: rpc.AgentDispatchInternal.CreateDispatch:input_type -> livekit.CreateAgentDispatchRequest
|
||||
1, // 1: rpc.AgentDispatchInternal.DeleteDispatch:input_type -> livekit.DeleteAgentDispatchRequest
|
||||
2, // 2: rpc.AgentDispatchInternal.ListDispatch:input_type -> livekit.ListAgentDispatchRequest
|
||||
3, // 3: rpc.AgentDispatchInternal.CreateDispatch:output_type -> livekit.AgentDispatch
|
||||
3, // 4: rpc.AgentDispatchInternal.DeleteDispatch:output_type -> livekit.AgentDispatch
|
||||
4, // 5: rpc.AgentDispatchInternal.ListDispatch:output_type -> livekit.ListAgentDispatchResponse
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_agent_dispatch_proto_init() }
|
||||
func file_rpc_agent_dispatch_proto_init() {
|
||||
if File_rpc_agent_dispatch_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_agent_dispatch_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_rpc_agent_dispatch_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_agent_dispatch_proto_depIdxs,
|
||||
}.Build()
|
||||
File_rpc_agent_dispatch_proto = out.File
|
||||
file_rpc_agent_dispatch_proto_rawDesc = nil
|
||||
file_rpc_agent_dispatch_proto_goTypes = nil
|
||||
file_rpc_agent_dispatch_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
// Code generated by protoc-gen-psrpc v0.5.1, DO NOT EDIT.
|
||||
// source: rpc/agent_dispatch.proto
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/livekit/psrpc"
|
||||
"github.com/livekit/psrpc/pkg/client"
|
||||
"github.com/livekit/psrpc/pkg/info"
|
||||
"github.com/livekit/psrpc/pkg/rand"
|
||||
"github.com/livekit/psrpc/pkg/server"
|
||||
"github.com/livekit/psrpc/version"
|
||||
)
|
||||
import livekit2 "github.com/livekit/protocol/livekit"
|
||||
|
||||
var _ = version.PsrpcVersion_0_5
|
||||
|
||||
// ======================================
|
||||
// AgentDispatchInternal Client Interface
|
||||
// ======================================
|
||||
|
||||
type AgentDispatchInternalClient[RoomTopicType ~string] interface {
|
||||
CreateDispatch(ctx context.Context, room RoomTopicType, req *livekit2.CreateAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.AgentDispatch, error)
|
||||
|
||||
DeleteDispatch(ctx context.Context, room RoomTopicType, req *livekit2.DeleteAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.AgentDispatch, error)
|
||||
|
||||
ListDispatch(ctx context.Context, room RoomTopicType, req *livekit2.ListAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.ListAgentDispatchResponse, error)
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// AgentDispatchInternal ServerImpl Interface
|
||||
// ==========================================
|
||||
|
||||
type AgentDispatchInternalServerImpl interface {
|
||||
CreateDispatch(context.Context, *livekit2.CreateAgentDispatchRequest) (*livekit2.AgentDispatch, error)
|
||||
|
||||
DeleteDispatch(context.Context, *livekit2.DeleteAgentDispatchRequest) (*livekit2.AgentDispatch, error)
|
||||
|
||||
ListDispatch(context.Context, *livekit2.ListAgentDispatchRequest) (*livekit2.ListAgentDispatchResponse, error)
|
||||
}
|
||||
|
||||
// ======================================
|
||||
// AgentDispatchInternal Server Interface
|
||||
// ======================================
|
||||
|
||||
type AgentDispatchInternalServer[RoomTopicType ~string] interface {
|
||||
RegisterCreateDispatchTopic(room RoomTopicType) error
|
||||
DeregisterCreateDispatchTopic(room RoomTopicType)
|
||||
RegisterDeleteDispatchTopic(room RoomTopicType) error
|
||||
DeregisterDeleteDispatchTopic(room RoomTopicType)
|
||||
RegisterListDispatchTopic(room RoomTopicType) error
|
||||
DeregisterListDispatchTopic(room RoomTopicType)
|
||||
RegisterAllRoomTopics(room RoomTopicType) error
|
||||
DeregisterAllRoomTopics(room RoomTopicType)
|
||||
|
||||
// Close and wait for pending RPCs to complete
|
||||
Shutdown()
|
||||
|
||||
// Close immediately, without waiting for pending RPCs
|
||||
Kill()
|
||||
}
|
||||
|
||||
// ============================
|
||||
// AgentDispatchInternal Client
|
||||
// ============================
|
||||
|
||||
type agentDispatchInternalClient[RoomTopicType ~string] struct {
|
||||
client *client.RPCClient
|
||||
}
|
||||
|
||||
// NewAgentDispatchInternalClient creates a psrpc client that implements the AgentDispatchInternalClient interface.
|
||||
func NewAgentDispatchInternalClient[RoomTopicType ~string](bus psrpc.MessageBus, opts ...psrpc.ClientOption) (AgentDispatchInternalClient[RoomTopicType], error) {
|
||||
sd := &info.ServiceDefinition{
|
||||
Name: "AgentDispatchInternal",
|
||||
ID: rand.NewClientID(),
|
||||
}
|
||||
|
||||
sd.RegisterMethod("CreateDispatch", false, false, true, true)
|
||||
sd.RegisterMethod("DeleteDispatch", false, false, true, true)
|
||||
sd.RegisterMethod("ListDispatch", false, false, true, true)
|
||||
|
||||
rpcClient, err := client.NewRPCClient(sd, bus, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &agentDispatchInternalClient[RoomTopicType]{
|
||||
client: rpcClient,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *agentDispatchInternalClient[RoomTopicType]) CreateDispatch(ctx context.Context, room RoomTopicType, req *livekit2.CreateAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.AgentDispatch, error) {
|
||||
return client.RequestSingle[*livekit2.AgentDispatch](ctx, c.client, "CreateDispatch", []string{string(room)}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *agentDispatchInternalClient[RoomTopicType]) DeleteDispatch(ctx context.Context, room RoomTopicType, req *livekit2.DeleteAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.AgentDispatch, error) {
|
||||
return client.RequestSingle[*livekit2.AgentDispatch](ctx, c.client, "DeleteDispatch", []string{string(room)}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *agentDispatchInternalClient[RoomTopicType]) ListDispatch(ctx context.Context, room RoomTopicType, req *livekit2.ListAgentDispatchRequest, opts ...psrpc.RequestOption) (*livekit2.ListAgentDispatchResponse, error) {
|
||||
return client.RequestSingle[*livekit2.ListAgentDispatchResponse](ctx, c.client, "ListDispatch", []string{string(room)}, req, opts...)
|
||||
}
|
||||
|
||||
// ============================
|
||||
// AgentDispatchInternal Server
|
||||
// ============================
|
||||
|
||||
type agentDispatchInternalServer[RoomTopicType ~string] struct {
|
||||
svc AgentDispatchInternalServerImpl
|
||||
rpc *server.RPCServer
|
||||
}
|
||||
|
||||
// NewAgentDispatchInternalServer builds a RPCServer that will route requests
|
||||
// to the corresponding method in the provided svc implementation.
|
||||
func NewAgentDispatchInternalServer[RoomTopicType ~string](svc AgentDispatchInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (AgentDispatchInternalServer[RoomTopicType], error) {
|
||||
sd := &info.ServiceDefinition{
|
||||
Name: "AgentDispatchInternal",
|
||||
ID: rand.NewServerID(),
|
||||
}
|
||||
|
||||
s := server.NewRPCServer(sd, bus, opts...)
|
||||
|
||||
sd.RegisterMethod("CreateDispatch", false, false, true, true)
|
||||
sd.RegisterMethod("DeleteDispatch", false, false, true, true)
|
||||
sd.RegisterMethod("ListDispatch", false, false, true, true)
|
||||
return &agentDispatchInternalServer[RoomTopicType]{
|
||||
svc: svc,
|
||||
rpc: s,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) RegisterCreateDispatchTopic(room RoomTopicType) error {
|
||||
return server.RegisterHandler(s.rpc, "CreateDispatch", []string{string(room)}, s.svc.CreateDispatch, nil)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) DeregisterCreateDispatchTopic(room RoomTopicType) {
|
||||
s.rpc.DeregisterHandler("CreateDispatch", []string{string(room)})
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) RegisterDeleteDispatchTopic(room RoomTopicType) error {
|
||||
return server.RegisterHandler(s.rpc, "DeleteDispatch", []string{string(room)}, s.svc.DeleteDispatch, nil)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) DeregisterDeleteDispatchTopic(room RoomTopicType) {
|
||||
s.rpc.DeregisterHandler("DeleteDispatch", []string{string(room)})
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) RegisterListDispatchTopic(room RoomTopicType) error {
|
||||
return server.RegisterHandler(s.rpc, "ListDispatch", []string{string(room)}, s.svc.ListDispatch, nil)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) DeregisterListDispatchTopic(room RoomTopicType) {
|
||||
s.rpc.DeregisterHandler("ListDispatch", []string{string(room)})
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) allRoomTopicRegisterers() server.RegistererSlice {
|
||||
return server.RegistererSlice{
|
||||
server.NewRegisterer(s.RegisterCreateDispatchTopic, s.DeregisterCreateDispatchTopic),
|
||||
server.NewRegisterer(s.RegisterDeleteDispatchTopic, s.DeregisterDeleteDispatchTopic),
|
||||
server.NewRegisterer(s.RegisterListDispatchTopic, s.DeregisterListDispatchTopic),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) RegisterAllRoomTopics(room RoomTopicType) error {
|
||||
return s.allRoomTopicRegisterers().Register(room)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) DeregisterAllRoomTopics(room RoomTopicType) {
|
||||
s.allRoomTopicRegisterers().Deregister(room)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) Shutdown() {
|
||||
s.rpc.Close(false)
|
||||
}
|
||||
|
||||
func (s *agentDispatchInternalServer[RoomTopicType]) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor1 = []byte{
|
||||
// 226 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x2a, 0x48, 0xd6,
|
||||
0x4f, 0x4c, 0x4f, 0xcd, 0x2b, 0x89, 0x4f, 0xc9, 0x2c, 0x2e, 0x48, 0x2c, 0x49, 0xce, 0xd0, 0x2b,
|
||||
0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2e, 0x2a, 0x48, 0x96, 0xe2, 0xcd, 0x2f, 0x28, 0xc9, 0xcc,
|
||||
0xcf, 0x2b, 0x86, 0x88, 0x49, 0xc9, 0xe4, 0x64, 0x96, 0xa5, 0x66, 0x67, 0x96, 0xc4, 0x63, 0xd3,
|
||||
0x61, 0x74, 0x85, 0x89, 0x4b, 0xd4, 0x11, 0x24, 0xe1, 0x02, 0x15, 0xf7, 0xcc, 0x2b, 0x49, 0x2d,
|
||||
0xca, 0x4b, 0xcc, 0x11, 0x4a, 0xe5, 0xe2, 0x73, 0x2e, 0x4a, 0x4d, 0x2c, 0x49, 0x85, 0xc9, 0x08,
|
||||
0x29, 0xeb, 0x41, 0x8d, 0xd2, 0x83, 0x48, 0xa0, 0xe8, 0x0b, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e,
|
||||
0x91, 0x12, 0x83, 0x2b, 0x42, 0x91, 0x56, 0x12, 0xdb, 0xd4, 0xc9, 0x28, 0x24, 0xc0, 0x28, 0xc5,
|
||||
0xc7, 0xc5, 0x52, 0x94, 0x9f, 0x9f, 0x2b, 0x04, 0x26, 0x25, 0x18, 0x41, 0xd6, 0xb8, 0xa4, 0xe6,
|
||||
0xa4, 0x62, 0xb5, 0x06, 0x22, 0x41, 0x15, 0x6b, 0x72, 0xb9, 0x78, 0x7c, 0x32, 0x8b, 0xe1, 0xea,
|
||||
0x84, 0x14, 0xe1, 0xfa, 0x41, 0xc2, 0x58, 0xad, 0x50, 0xc2, 0xa7, 0xa4, 0xb8, 0x20, 0x3f, 0xaf,
|
||||
0x38, 0x15, 0x97, 0x75, 0x4e, 0x8a, 0x51, 0xf2, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9,
|
||||
0xf9, 0xb9, 0xfa, 0x50, 0x73, 0xf4, 0xc1, 0x41, 0x9e, 0x9c, 0x9f, 0xa3, 0x5f, 0x54, 0x90, 0x9c,
|
||||
0xc4, 0x06, 0xe6, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x19, 0xd2, 0x29, 0xe1, 0xce, 0x01,
|
||||
0x00, 0x00,
|
||||
}
|
||||
+14
-14
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/livekit/psrpc/pkg/server"
|
||||
"github.com/livekit/psrpc/version"
|
||||
)
|
||||
import livekit2 "github.com/livekit/protocol/livekit"
|
||||
import livekit3 "github.com/livekit/protocol/livekit"
|
||||
|
||||
var _ = version.PsrpcVersion_0_5
|
||||
|
||||
@@ -22,7 +22,7 @@ var _ = version.PsrpcVersion_0_5
|
||||
// ===============================
|
||||
|
||||
type EgressInternalClient interface {
|
||||
StartEgress(ctx context.Context, topic string, req *StartEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)
|
||||
StartEgress(ctx context.Context, topic string, req *StartEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error)
|
||||
|
||||
ListActiveEgress(ctx context.Context, topic string, req *ListActiveEgressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveEgressResponse], error)
|
||||
}
|
||||
@@ -32,7 +32,7 @@ type EgressInternalClient interface {
|
||||
// ===================================
|
||||
|
||||
type EgressInternalServerImpl interface {
|
||||
StartEgress(context.Context, *StartEgressRequest) (*livekit2.EgressInfo, error)
|
||||
StartEgress(context.Context, *StartEgressRequest) (*livekit3.EgressInfo, error)
|
||||
StartEgressAffinity(context.Context, *StartEgressRequest) float32
|
||||
|
||||
ListActiveEgress(context.Context, *ListActiveEgressRequest) (*ListActiveEgressResponse, error)
|
||||
@@ -83,8 +83,8 @@ func NewEgressInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *egressInternalClient) StartEgress(ctx context.Context, topic string, req *StartEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit2.EgressInfo](ctx, c.client, "StartEgress", []string{topic}, req, opts...)
|
||||
func (c *egressInternalClient) StartEgress(ctx context.Context, topic string, req *StartEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit3.EgressInfo](ctx, c.client, "StartEgress", []string{topic}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *egressInternalClient) ListActiveEgress(ctx context.Context, topic string, req *ListActiveEgressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveEgressResponse], error) {
|
||||
@@ -147,9 +147,9 @@ func (s *egressInternalServer) Kill() {
|
||||
// ==============================
|
||||
|
||||
type EgressHandlerClient interface {
|
||||
UpdateStream(ctx context.Context, topic string, req *livekit2.UpdateStreamRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)
|
||||
UpdateStream(ctx context.Context, topic string, req *livekit3.UpdateStreamRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error)
|
||||
|
||||
StopEgress(ctx context.Context, topic string, req *livekit2.StopEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)
|
||||
StopEgress(ctx context.Context, topic string, req *livekit3.StopEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error)
|
||||
}
|
||||
|
||||
// ==================================
|
||||
@@ -157,9 +157,9 @@ type EgressHandlerClient interface {
|
||||
// ==================================
|
||||
|
||||
type EgressHandlerServerImpl interface {
|
||||
UpdateStream(context.Context, *livekit2.UpdateStreamRequest) (*livekit2.EgressInfo, error)
|
||||
UpdateStream(context.Context, *livekit3.UpdateStreamRequest) (*livekit3.EgressInfo, error)
|
||||
|
||||
StopEgress(context.Context, *livekit2.StopEgressRequest) (*livekit2.EgressInfo, error)
|
||||
StopEgress(context.Context, *livekit3.StopEgressRequest) (*livekit3.EgressInfo, error)
|
||||
}
|
||||
|
||||
// ==============================
|
||||
@@ -207,12 +207,12 @@ func NewEgressHandlerClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (E
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *egressHandlerClient) UpdateStream(ctx context.Context, topic string, req *livekit2.UpdateStreamRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit2.EgressInfo](ctx, c.client, "UpdateStream", []string{topic}, req, opts...)
|
||||
func (c *egressHandlerClient) UpdateStream(ctx context.Context, topic string, req *livekit3.UpdateStreamRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit3.EgressInfo](ctx, c.client, "UpdateStream", []string{topic}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *egressHandlerClient) StopEgress(ctx context.Context, topic string, req *livekit2.StopEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit2.EgressInfo](ctx, c.client, "StopEgress", []string{topic}, req, opts...)
|
||||
func (c *egressHandlerClient) StopEgress(ctx context.Context, topic string, req *livekit3.StopEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit3.EgressInfo](ctx, c.client, "StopEgress", []string{topic}, req, opts...)
|
||||
}
|
||||
|
||||
// ====================
|
||||
@@ -266,7 +266,7 @@ func (s *egressHandlerServer) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor1 = []byte{
|
||||
var psrpcFileDescriptor2 = []byte{
|
||||
// 491 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xd1, 0x6e, 0x12, 0x41,
|
||||
0x14, 0x86, 0x9d, 0x12, 0x96, 0xee, 0x41, 0x90, 0x8c, 0x35, 0x4c, 0x69, 0x1b, 0x29, 0x7a, 0xc1,
|
||||
|
||||
+14
-14
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/livekit/psrpc/version"
|
||||
)
|
||||
import google_protobuf "google.golang.org/protobuf/types/known/emptypb"
|
||||
import livekit3 "github.com/livekit/protocol/livekit"
|
||||
import livekit4 "github.com/livekit/protocol/livekit"
|
||||
|
||||
var _ = version.PsrpcVersion_0_5
|
||||
|
||||
@@ -23,7 +23,7 @@ var _ = version.PsrpcVersion_0_5
|
||||
// ================================
|
||||
|
||||
type IngressInternalClient interface {
|
||||
StartIngress(ctx context.Context, req *StartIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressInfo, error)
|
||||
StartIngress(ctx context.Context, req *StartIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressInfo, error)
|
||||
|
||||
ListActiveIngress(ctx context.Context, topic string, req *ListActiveIngressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveIngressResponse], error)
|
||||
|
||||
@@ -35,7 +35,7 @@ type IngressInternalClient interface {
|
||||
// ====================================
|
||||
|
||||
type IngressInternalServerImpl interface {
|
||||
StartIngress(context.Context, *StartIngressRequest) (*livekit3.IngressInfo, error)
|
||||
StartIngress(context.Context, *StartIngressRequest) (*livekit4.IngressInfo, error)
|
||||
StartIngressAffinity(context.Context, *StartIngressRequest) float32
|
||||
|
||||
ListActiveIngress(context.Context, *ListActiveIngressRequest) (*ListActiveIngressResponse, error)
|
||||
@@ -89,8 +89,8 @@ func NewIngressInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption)
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *ingressInternalClient) StartIngress(ctx context.Context, req *StartIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressInfo, error) {
|
||||
return client.RequestSingle[*livekit3.IngressInfo](ctx, c.client, "StartIngress", nil, req, opts...)
|
||||
func (c *ingressInternalClient) StartIngress(ctx context.Context, req *StartIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressInfo, error) {
|
||||
return client.RequestSingle[*livekit4.IngressInfo](ctx, c.client, "StartIngress", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *ingressInternalClient) ListActiveIngress(ctx context.Context, topic string, req *ListActiveIngressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveIngressResponse], error) {
|
||||
@@ -165,9 +165,9 @@ func (s *ingressInternalServer) Kill() {
|
||||
// ===============================
|
||||
|
||||
type IngressHandlerClient interface {
|
||||
UpdateIngress(ctx context.Context, topic string, req *livekit3.UpdateIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error)
|
||||
UpdateIngress(ctx context.Context, topic string, req *livekit4.UpdateIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressState, error)
|
||||
|
||||
DeleteIngress(ctx context.Context, topic string, req *livekit3.DeleteIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error)
|
||||
DeleteIngress(ctx context.Context, topic string, req *livekit4.DeleteIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressState, error)
|
||||
|
||||
DeleteWHIPResource(ctx context.Context, topic string, req *DeleteWHIPResourceRequest, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
|
||||
@@ -179,9 +179,9 @@ type IngressHandlerClient interface {
|
||||
// ===================================
|
||||
|
||||
type IngressHandlerServerImpl interface {
|
||||
UpdateIngress(context.Context, *livekit3.UpdateIngressRequest) (*livekit3.IngressState, error)
|
||||
UpdateIngress(context.Context, *livekit4.UpdateIngressRequest) (*livekit4.IngressState, error)
|
||||
|
||||
DeleteIngress(context.Context, *livekit3.DeleteIngressRequest) (*livekit3.IngressState, error)
|
||||
DeleteIngress(context.Context, *livekit4.DeleteIngressRequest) (*livekit4.IngressState, error)
|
||||
|
||||
DeleteWHIPResource(context.Context, *DeleteWHIPResourceRequest) (*google_protobuf.Empty, error)
|
||||
|
||||
@@ -239,12 +239,12 @@ func NewIngressHandlerClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *ingressHandlerClient) UpdateIngress(ctx context.Context, topic string, req *livekit3.UpdateIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error) {
|
||||
return client.RequestSingle[*livekit3.IngressState](ctx, c.client, "UpdateIngress", []string{topic}, req, opts...)
|
||||
func (c *ingressHandlerClient) UpdateIngress(ctx context.Context, topic string, req *livekit4.UpdateIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressState, error) {
|
||||
return client.RequestSingle[*livekit4.IngressState](ctx, c.client, "UpdateIngress", []string{topic}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *ingressHandlerClient) DeleteIngress(ctx context.Context, topic string, req *livekit3.DeleteIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error) {
|
||||
return client.RequestSingle[*livekit3.IngressState](ctx, c.client, "DeleteIngress", []string{topic}, req, opts...)
|
||||
func (c *ingressHandlerClient) DeleteIngress(ctx context.Context, topic string, req *livekit4.DeleteIngressRequest, opts ...psrpc.RequestOption) (*livekit4.IngressState, error) {
|
||||
return client.RequestSingle[*livekit4.IngressState](ctx, c.client, "DeleteIngress", []string{topic}, req, opts...)
|
||||
}
|
||||
|
||||
func (c *ingressHandlerClient) DeleteWHIPResource(ctx context.Context, topic string, req *DeleteWHIPResourceRequest, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
@@ -324,7 +324,7 @@ func (s *ingressHandlerServer) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor2 = []byte{
|
||||
var psrpcFileDescriptor3 = []byte{
|
||||
// 748 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0xc6, 0x52, 0xb2, 0x6a, 0x8d, 0x2c, 0x5b, 0x5e, 0xff, 0x80, 0x62, 0x21, 0xff, 0xd0, 0x17,
|
||||
|
||||
+19
-19
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/livekit/psrpc/version"
|
||||
)
|
||||
import google_protobuf "google.golang.org/protobuf/types/known/emptypb"
|
||||
import livekit2 "github.com/livekit/protocol/livekit"
|
||||
import livekit3 "github.com/livekit/protocol/livekit"
|
||||
import livekit4 "github.com/livekit/protocol/livekit"
|
||||
|
||||
var _ = version.PsrpcVersion_0_5
|
||||
|
||||
@@ -25,18 +25,18 @@ var _ = version.PsrpcVersion_0_5
|
||||
|
||||
type IOInfoClient interface {
|
||||
// egress
|
||||
CreateEgress(ctx context.Context, req *livekit2.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
CreateEgress(ctx context.Context, req *livekit3.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
|
||||
UpdateEgress(ctx context.Context, req *livekit2.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
UpdateEgress(ctx context.Context, req *livekit3.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
|
||||
GetEgress(ctx context.Context, req *GetEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)
|
||||
GetEgress(ctx context.Context, req *GetEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error)
|
||||
|
||||
ListEgress(ctx context.Context, req *livekit2.ListEgressRequest, opts ...psrpc.RequestOption) (*livekit2.ListEgressResponse, error)
|
||||
ListEgress(ctx context.Context, req *livekit3.ListEgressRequest, opts ...psrpc.RequestOption) (*livekit3.ListEgressResponse, error)
|
||||
|
||||
UpdateMetrics(ctx context.Context, req *UpdateMetricsRequest, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
|
||||
// ingress
|
||||
CreateIngress(ctx context.Context, req *livekit3.IngressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
CreateIngress(ctx context.Context, req *livekit4.IngressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
|
||||
|
||||
GetIngressInfo(ctx context.Context, req *GetIngressInfoRequest, opts ...psrpc.RequestOption) (*GetIngressInfoResponse, error)
|
||||
|
||||
@@ -54,18 +54,18 @@ type IOInfoClient interface {
|
||||
|
||||
type IOInfoServerImpl interface {
|
||||
// egress
|
||||
CreateEgress(context.Context, *livekit2.EgressInfo) (*google_protobuf.Empty, error)
|
||||
CreateEgress(context.Context, *livekit3.EgressInfo) (*google_protobuf.Empty, error)
|
||||
|
||||
UpdateEgress(context.Context, *livekit2.EgressInfo) (*google_protobuf.Empty, error)
|
||||
UpdateEgress(context.Context, *livekit3.EgressInfo) (*google_protobuf.Empty, error)
|
||||
|
||||
GetEgress(context.Context, *GetEgressRequest) (*livekit2.EgressInfo, error)
|
||||
GetEgress(context.Context, *GetEgressRequest) (*livekit3.EgressInfo, error)
|
||||
|
||||
ListEgress(context.Context, *livekit2.ListEgressRequest) (*livekit2.ListEgressResponse, error)
|
||||
ListEgress(context.Context, *livekit3.ListEgressRequest) (*livekit3.ListEgressResponse, error)
|
||||
|
||||
UpdateMetrics(context.Context, *UpdateMetricsRequest) (*google_protobuf.Empty, error)
|
||||
|
||||
// ingress
|
||||
CreateIngress(context.Context, *livekit3.IngressInfo) (*google_protobuf.Empty, error)
|
||||
CreateIngress(context.Context, *livekit4.IngressInfo) (*google_protobuf.Empty, error)
|
||||
|
||||
GetIngressInfo(context.Context, *GetIngressInfoRequest) (*GetIngressInfoResponse, error)
|
||||
|
||||
@@ -126,27 +126,27 @@ func NewIOInfoClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (IOInfoCl
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) CreateEgress(ctx context.Context, req *livekit2.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
func (c *iOInfoClient) CreateEgress(ctx context.Context, req *livekit3.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
return client.RequestSingle[*google_protobuf.Empty](ctx, c.client, "CreateEgress", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) UpdateEgress(ctx context.Context, req *livekit2.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
func (c *iOInfoClient) UpdateEgress(ctx context.Context, req *livekit3.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
return client.RequestSingle[*google_protobuf.Empty](ctx, c.client, "UpdateEgress", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) GetEgress(ctx context.Context, req *GetEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit2.EgressInfo](ctx, c.client, "GetEgress", nil, req, opts...)
|
||||
func (c *iOInfoClient) GetEgress(ctx context.Context, req *GetEgressRequest, opts ...psrpc.RequestOption) (*livekit3.EgressInfo, error) {
|
||||
return client.RequestSingle[*livekit3.EgressInfo](ctx, c.client, "GetEgress", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) ListEgress(ctx context.Context, req *livekit2.ListEgressRequest, opts ...psrpc.RequestOption) (*livekit2.ListEgressResponse, error) {
|
||||
return client.RequestSingle[*livekit2.ListEgressResponse](ctx, c.client, "ListEgress", nil, req, opts...)
|
||||
func (c *iOInfoClient) ListEgress(ctx context.Context, req *livekit3.ListEgressRequest, opts ...psrpc.RequestOption) (*livekit3.ListEgressResponse, error) {
|
||||
return client.RequestSingle[*livekit3.ListEgressResponse](ctx, c.client, "ListEgress", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) UpdateMetrics(ctx context.Context, req *UpdateMetricsRequest, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
return client.RequestSingle[*google_protobuf.Empty](ctx, c.client, "UpdateMetrics", nil, req, opts...)
|
||||
}
|
||||
|
||||
func (c *iOInfoClient) CreateIngress(ctx context.Context, req *livekit3.IngressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
func (c *iOInfoClient) CreateIngress(ctx context.Context, req *livekit4.IngressInfo, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error) {
|
||||
return client.RequestSingle[*google_protobuf.Empty](ctx, c.client, "CreateIngress", nil, req, opts...)
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ func (s *iOInfoServer) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor3 = []byte{
|
||||
var psrpcFileDescriptor4 = []byte{
|
||||
// 1178 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdb, 0x72, 0xdb, 0x44,
|
||||
0x18, 0xc6, 0xc7, 0xc6, 0xbf, 0x93, 0xd4, 0xdd, 0x3a, 0xc1, 0x55, 0x86, 0x36, 0x75, 0x29, 0x04,
|
||||
|
||||
@@ -114,7 +114,7 @@ func (s *keepaliveServer[NodeIDTopicType]) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor4 = []byte{
|
||||
var psrpcFileDescriptor5 = []byte{
|
||||
// 178 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2a, 0x48, 0xd6,
|
||||
0xcf, 0x4e, 0x4d, 0x2d, 0x48, 0xcc, 0xc9, 0x2c, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
|
||||
|
||||
@@ -201,7 +201,7 @@ func (s *participantServer[ParticipantTopicType]) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor5 = []byte{
|
||||
var psrpcFileDescriptor6 = []byte{
|
||||
// 293 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xc3, 0x40,
|
||||
0x10, 0xc6, 0x09, 0x8a, 0x87, 0x2d, 0x82, 0x5d, 0x15, 0x4a, 0xf0, 0x4f, 0x5b, 0x7b, 0x4e, 0x40,
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ func (s *roomServer[RoomTopicType]) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor6 = []byte{
|
||||
var psrpcFileDescriptor7 = []byte{
|
||||
// 230 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x2a, 0x48, 0xd6,
|
||||
0x2f, 0xca, 0xcf, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2e, 0x2a, 0x48, 0x96,
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ func (s *signalServer[NodeIdTopicType]) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor7 = []byte{
|
||||
var psrpcFileDescriptor8 = []byte{
|
||||
// 307 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4e, 0xc3, 0x30,
|
||||
0x10, 0x86, 0x65, 0xd2, 0x96, 0xe2, 0x52, 0xa9, 0xb8, 0xd0, 0x5a, 0x59, 0x08, 0x9d, 0x32, 0x39,
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ func (s *sIPInternalServer) Kill() {
|
||||
s.rpc.Close(true)
|
||||
}
|
||||
|
||||
var psrpcFileDescriptor8 = []byte{
|
||||
var psrpcFileDescriptor9 = []byte{
|
||||
// 550 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xd1, 0x6e, 0xd3, 0x3c,
|
||||
0x14, 0x56, 0xd6, 0xad, 0x5b, 0x4f, 0xd7, 0xae, 0xf3, 0xdf, 0xee, 0xb7, 0x82, 0x04, 0xa5, 0x03,
|
||||
|
||||
@@ -149,6 +149,18 @@ func NewTypedParticipantServer(svc ParticipantServerImpl, bus psrpc.MessageBus,
|
||||
return NewParticipantServer[ParticipantTopic](svc, bus, opts...)
|
||||
}
|
||||
|
||||
//counterfeiter:generate . TypedAgentDispatchInternalClient
|
||||
type TypedAgentDispatchInternalClient = AgentDispatchInternalClient[RoomTopic]
|
||||
type TypedAgentDispatchInternalServer = AgentDispatchInternalServer[RoomTopic]
|
||||
|
||||
func NewTypedAgentDispatchInternalClient(params ClientParams) (TypedAgentDispatchInternalClient, error) {
|
||||
return NewAgentDispatchInternalClient[RoomTopic](params.Bus, params.Options()...)
|
||||
}
|
||||
|
||||
func NewTypedAgentDispatchInternalServer(svc AgentDispatchInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (TypedAgentDispatchInternalServer, error) {
|
||||
return NewAgentDispatchInternalServer[RoomTopic](svc, bus, opts...)
|
||||
}
|
||||
|
||||
//counterfeiter:generate . KeepalivePubSub
|
||||
type KeepalivePubSub interface {
|
||||
KeepaliveClient[livekit.NodeID]
|
||||
|
||||
Reference in New Issue
Block a user