diff --git a/cmd/client/main.go b/cmd/client/main.go index 5d04a6f..4afe0cf 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -6,11 +6,16 @@ import ( "log/slog" "os" "runtime/debug" + "time" + "git.netflux.io/rob/octoplex/internal/client" "git.netflux.io/rob/octoplex/internal/domain" "git.netflux.io/rob/octoplex/internal/event" + pb "git.netflux.io/rob/octoplex/internal/generated/grpc" "git.netflux.io/rob/octoplex/internal/terminal" "golang.design/x/clipboard" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) var ( @@ -53,11 +58,50 @@ func run() error { return fmt.Errorf("read build info: %w", err) } + conn, err := grpc.NewClient("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return fmt.Errorf("connect to gRPC server: %w", err) + } + apiClient := pb.NewInternalAPIClient(conn) + stream, err := apiClient.Communicate(ctx) + if err != nil { + return fmt.Errorf("create gRPC stream: %w", err) + } + + go func() { + for evt := range bus.Register() { + if sendErr := stream.Send(&pb.Envelope{Payload: &pb.Envelope_Event{Event: client.EventToProto(evt)}}); sendErr != nil { + logger.Error("Error sending event to gRPC API", "err", sendErr) + } + } + }() + + go func() { + for { + envelope, recErr := stream.Recv() + if recErr != nil { + logger.Error("Error receiving envelope from gRPC API", "err", recErr) + continue + } + + evt := envelope.GetEvent() + if evt == nil { + logger.Error("Received envelope without event") + continue + } + + logger.Info("Received event from gRPC API", "event", evt) + // TODO: convert to domain event + } + }() + ui, err := terminal.StartUI(ctx, terminal.StartParams{ EventBus: bus, Dispatcher: func(cmd event.Command) { - // TODO: this must call the gRPC client logger.Info("Command dispatched", "cmd", cmd) + if sendErr := stream.Send(&pb.Envelope{Payload: &pb.Envelope_Command{Command: client.CommandToProto(cmd)}}); sendErr != nil { + logger.Error("Error sending command to gRPC API", "err", sendErr) + } }, ClipboardAvailable: clipboardAvailable, ConfigFilePath: "TODO", @@ -74,5 +118,7 @@ func run() error { } defer ui.Close() + time.Sleep(10 * time.Minute) // Simulate long-running process + return nil } diff --git a/internal/app/app.go b/internal/app/app.go index 27f07fb..16aecea 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -15,7 +15,7 @@ import ( "git.netflux.io/rob/octoplex/internal/container" "git.netflux.io/rob/octoplex/internal/domain" "git.netflux.io/rob/octoplex/internal/event" - pb "git.netflux.io/rob/octoplex/internal/generated/grpc/proto" + pb "git.netflux.io/rob/octoplex/internal/generated/grpc" "git.netflux.io/rob/octoplex/internal/mediaserver" "git.netflux.io/rob/octoplex/internal/replicator" "git.netflux.io/rob/octoplex/internal/server" @@ -259,7 +259,7 @@ func (a *App) handleCommand( }) if err := a.configService.SetConfig(newCfg); err != nil { a.logger.Error("Add destination failed", "err", err) - return event.AddDestinationFailedEvent{Err: err}, nil + return event.AddDestinationFailedEvent{URL: c.URL, Err: err}, nil } a.cfg = newCfg a.handleConfigUpdate(state) @@ -272,7 +272,7 @@ func (a *App) handleCommand( }) if err := a.configService.SetConfig(newCfg); err != nil { a.logger.Error("Remove destination failed", "err", err) - a.eventBus.Send(event.RemoveDestinationFailedEvent{Err: err}) + a.eventBus.Send(event.RemoveDestinationFailedEvent{URL: c.URL, Err: err}) break } a.cfg = newCfg @@ -280,7 +280,7 @@ func (a *App) handleCommand( a.eventBus.Send(event.DestinationRemovedEvent{URL: c.URL}) //nolint:gosimple case event.CommandStartDestination: if !state.Source.Live { - a.eventBus.Send(event.StartDestinationFailedEvent{}) + a.eventBus.Send(event.StartDestinationFailedEvent{URL: c.URL, Message: "source not live"}) break } diff --git a/internal/client/protocol.go b/internal/client/protocol.go new file mode 100644 index 0000000..b210b87 --- /dev/null +++ b/internal/client/protocol.go @@ -0,0 +1,238 @@ +// TODO: move protocol to a separate package +package client + +import ( + "git.netflux.io/rob/octoplex/internal/domain" + "git.netflux.io/rob/octoplex/internal/event" + "google.golang.org/protobuf/types/known/timestamppb" + + pb "git.netflux.io/rob/octoplex/internal/generated/grpc" +) + +// EventToProto converts an event to a protobuf message. +func EventToProto(ev event.Event) *pb.Event { + switch evt := ev.(type) { + case event.AppStateChangedEvent: + return buildAppStateChangeEvent(evt) + case event.DestinationAddedEvent: + return buildDestinationAddedEvent(evt) + case event.AddDestinationFailedEvent: + return buildAddDestinationFailedEvent(evt) + case event.DestinationStreamExitedEvent: + return buildDestinationStreamExitedEvent(evt) + case event.StartDestinationFailedEvent: + return buildStartDestinationFailedEvent(evt) + case event.DestinationRemovedEvent: + return buildDestinationRemovedEvent(evt) + case event.RemoveDestinationFailedEvent: + return buildRemoveDestinationFailedEvent(evt) + case event.FatalErrorOccurredEvent: + return buildFatalErrorOccurredEvent(evt) + case event.OtherInstanceDetectedEvent: + return buildOtherInstanceDetectedEvent(evt) + case event.MediaServerStartedEvent: + return buildMediaServerStartedEvent(evt) + default: + panic("unknown event type") + } +} + +// CommandToProto converts a command to a protobuf message. +func CommandToProto(command event.Command) *pb.Command { + switch evt := command.(type) { + case event.CommandAddDestination: + return buildAddDestinationCommand(evt) + case event.CommandRemoveDestination: + return buildRemoveDestinationCommand(evt) + case event.CommandStartDestination: + return buildStartDestinationCommand(evt) + case event.CommandStopDestination: + return buildStopDestinationCommand(evt) + case event.CommandCloseOtherInstance: + return buildCloseOtherInstanceCommand(evt) + case event.CommandQuit: + return buildQuitCommand(evt) + default: + panic("unknown command type") + } +} + +func buildAppStateChangeEvent(evt event.AppStateChangedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_AppStateChanged{ + AppStateChanged: &pb.AppStateChangedEvent{ + AppState: &pb.AppState{ + Source: &pb.Source{ + Container: containerToProto(evt.State.Source.Container), + Live: evt.State.Source.Live, + LiveChangedAt: timestamppb.New(evt.State.Source.LiveChangedAt), + Tracks: evt.State.Source.Tracks, + ExitReason: evt.State.Source.ExitReason, + }, + Destinations: destinationsToProto(evt.State.Destinations), + BuildInfo: &pb.BuildInfo{ + GoVersion: evt.State.BuildInfo.GoVersion, + Version: evt.State.BuildInfo.Version, + Commit: evt.State.BuildInfo.Commit, + Date: evt.State.BuildInfo.Date, + }, + }, + }, + }, + } +} + +func buildDestinationAddedEvent(evt event.DestinationAddedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_DestinationAdded{ + DestinationAdded: &pb.DestinationAddedEvent{Url: evt.URL}, + }, + } +} + +func buildAddDestinationFailedEvent(evt event.AddDestinationFailedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_AddDestinationFailed{ + AddDestinationFailed: &pb.AddDestinationFailedEvent{Url: evt.URL, Error: evt.Err.Error()}, + }, + } +} + +func buildDestinationStreamExitedEvent(evt event.DestinationStreamExitedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_DestinationStreamExited{ + DestinationStreamExited: &pb.DestinationStreamExitedEvent{Name: evt.Name, Error: evt.Err.Error()}, + }, + } +} + +func buildStartDestinationFailedEvent(evt event.StartDestinationFailedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_StartDestinationFailed{ + StartDestinationFailed: &pb.StartDestinationFailedEvent{Url: evt.URL, Message: evt.Message}, + }, + } +} + +func buildDestinationRemovedEvent(evt event.DestinationRemovedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_DestinationRemoved{ + DestinationRemoved: &pb.DestinationRemovedEvent{Url: evt.URL}, + }, + } +} + +func buildRemoveDestinationFailedEvent(evt event.RemoveDestinationFailedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_RemoveDestinationFailed{ + RemoveDestinationFailed: &pb.RemoveDestinationFailedEvent{Url: evt.URL, Error: evt.Err.Error()}, + }, + } +} + +func buildFatalErrorOccurredEvent(evt event.FatalErrorOccurredEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_FatalError{ + FatalError: &pb.FatalErrorEvent{Message: evt.Message}, + }, + } +} + +func buildOtherInstanceDetectedEvent(_ event.OtherInstanceDetectedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_OtherInstanceDetected{ + OtherInstanceDetected: &pb.OtherInstanceDetectedEvent{}, + }, + } +} + +func buildMediaServerStartedEvent(evt event.MediaServerStartedEvent) *pb.Event { + return &pb.Event{ + EventType: &pb.Event_MediaServerStarted{ + MediaServerStarted: &pb.MediaServerStartedEvent{RtmpUrl: evt.RTMPURL, RtmpsUrl: evt.RTMPSURL}, + }, + } +} + +func containerToProto(c domain.Container) *pb.Container { + var errString string + if c.Err != nil { + errString = c.Err.Error() + } + + var exitCode *int32 + if c.ExitCode != nil { + code := int32(*c.ExitCode) + exitCode = &code + } + + return &pb.Container{ + Id: c.ID, + Status: c.Status, + HealthState: c.HealthState, + CpuPercent: c.CPUPercent, + MemoryUsageBytes: c.MemoryUsageBytes, + RxRate: int32(c.RxRate), + TxRate: int32(c.TxRate), + RxSince: timestamppb.New(c.RxSince), + ImageName: c.ImageName, + PullStatus: c.PullStatus, + PullProgress: c.PullProgress, + PullPercent: int32(c.PullPercent), + RestartCount: int32(c.RestartCount), + ExitCode: exitCode, + Err: errString, + } +} + +func destinationsToProto(inDests []domain.Destination) []*pb.Destination { + destinations := make([]*pb.Destination, 0, len(inDests)) + for _, d := range inDests { + destinations = append(destinations, destinationToProto(d)) + } + return destinations +} + +func destinationToProto(d domain.Destination) *pb.Destination { + return &pb.Destination{ + Container: containerToProto(d.Container), + Status: destinationStatusToProto(d.Status), + Name: d.Name, + Url: d.URL, + } +} + +func destinationStatusToProto(s domain.DestinationStatus) pb.Destination_Status { + switch s { + case domain.DestinationStatusStarting: + return pb.Destination_STATUS_STARTING + case domain.DestinationStatusLive: + return pb.Destination_STATUS_LIVE + default: + return pb.Destination_STATUS_OFF_AIR + } +} + +func buildAddDestinationCommand(cmd event.CommandAddDestination) *pb.Command { + return &pb.Command{CommandType: &pb.Command_AddDestination{AddDestination: &pb.AddDestinationCommand{Url: cmd.URL}}} +} + +func buildRemoveDestinationCommand(cmd event.CommandRemoveDestination) *pb.Command { + return &pb.Command{CommandType: &pb.Command_RemoveDestination{RemoveDestination: &pb.RemoveDestinationCommand{Url: cmd.URL}}} +} + +func buildStartDestinationCommand(cmd event.CommandStartDestination) *pb.Command { + return &pb.Command{CommandType: &pb.Command_StartDestination{StartDestination: &pb.StartDestinationCommand{Url: cmd.URL}}} +} + +func buildStopDestinationCommand(cmd event.CommandStopDestination) *pb.Command { + return &pb.Command{CommandType: &pb.Command_StopDestination{StopDestination: &pb.StopDestinationCommand{Url: cmd.URL}}} +} + +func buildCloseOtherInstanceCommand(event.CommandCloseOtherInstance) *pb.Command { + return &pb.Command{CommandType: &pb.Command_CloseOtherInstances{CloseOtherInstances: &pb.CloseOtherInstancesCommand{}}} +} + +func buildQuitCommand(event.CommandQuit) *pb.Command { + return &pb.Command{CommandType: &pb.Command_Quit{Quit: &pb.QuitCommand{}}} +} diff --git a/internal/event/events.go b/internal/event/events.go index b9d15a7..a43bae9 100644 --- a/internal/event/events.go +++ b/internal/event/events.go @@ -42,6 +42,7 @@ func (e DestinationAddedEvent) name() Name { // AddDestinationFailedEvent is emitted when a destination fails to be added. type AddDestinationFailedEvent struct { + URL string Err error } @@ -60,7 +61,10 @@ func (e DestinationStreamExitedEvent) name() Name { } // StartDestinationFailedEvent is emitted when a destination fails to start. -type StartDestinationFailedEvent struct{} +type StartDestinationFailedEvent struct { + URL string + Message string +} func (e StartDestinationFailedEvent) name() Name { return EventNameStartDestinationFailed @@ -79,6 +83,7 @@ func (e DestinationRemovedEvent) name() Name { // RemoveDestinationFailedEvent is emitted when a destination fails to be // removed. type RemoveDestinationFailedEvent struct { + URL string Err error } diff --git a/internal/generated/grpc/api.pb.go b/internal/generated/grpc/api.pb.go new file mode 100644 index 0000000..70fcdcc --- /dev/null +++ b/internal/generated/grpc/api.pb.go @@ -0,0 +1,2351 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v6.30.1 +// source: api.proto + +package grpc + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +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) +) + +type Destination_Status int32 + +const ( + Destination_STATUS_OFF_AIR Destination_Status = 0 + Destination_STATUS_STARTING Destination_Status = 1 + Destination_STATUS_LIVE Destination_Status = 2 +) + +// Enum value maps for Destination_Status. +var ( + Destination_Status_name = map[int32]string{ + 0: "STATUS_OFF_AIR", + 1: "STATUS_STARTING", + 2: "STATUS_LIVE", + } + Destination_Status_value = map[string]int32{ + "STATUS_OFF_AIR": 0, + "STATUS_STARTING": 1, + "STATUS_LIVE": 2, + } +) + +func (x Destination_Status) Enum() *Destination_Status { + p := new(Destination_Status) + *p = x + return p +} + +func (x Destination_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Destination_Status) Descriptor() protoreflect.EnumDescriptor { + return file_api_proto_enumTypes[0].Descriptor() +} + +func (Destination_Status) Type() protoreflect.EnumType { + return &file_api_proto_enumTypes[0] +} + +func (x Destination_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Destination_Status.Descriptor instead. +func (Destination_Status) EnumDescriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{11, 0} +} + +type Envelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Payload: + // + // *Envelope_Command + // *Envelope_Event + Payload isEnvelope_Payload `protobuf_oneof:"payload"` +} + +func (x *Envelope) Reset() { + *x = Envelope{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Envelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Envelope) ProtoMessage() {} + +func (x *Envelope) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[0] + 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 Envelope.ProtoReflect.Descriptor instead. +func (*Envelope) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{0} +} + +func (m *Envelope) GetPayload() isEnvelope_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *Envelope) GetCommand() *Command { + if x, ok := x.GetPayload().(*Envelope_Command); ok { + return x.Command + } + return nil +} + +func (x *Envelope) GetEvent() *Event { + if x, ok := x.GetPayload().(*Envelope_Event); ok { + return x.Event + } + return nil +} + +type isEnvelope_Payload interface { + isEnvelope_Payload() +} + +type Envelope_Command struct { + Command *Command `protobuf:"bytes,1,opt,name=command,proto3,oneof"` +} + +type Envelope_Event struct { + Event *Event `protobuf:"bytes,2,opt,name=event,proto3,oneof"` +} + +func (*Envelope_Command) isEnvelope_Payload() {} + +func (*Envelope_Event) isEnvelope_Payload() {} + +type Command struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to CommandType: + // + // *Command_AddDestination + // *Command_RemoveDestination + // *Command_StartDestination + // *Command_StopDestination + // *Command_CloseOtherInstances + // *Command_Quit + CommandType isCommand_CommandType `protobuf_oneof:"command_type"` +} + +func (x *Command) Reset() { + *x = Command{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Command) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Command) ProtoMessage() {} + +func (x *Command) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[1] + 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 Command.ProtoReflect.Descriptor instead. +func (*Command) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{1} +} + +func (m *Command) GetCommandType() isCommand_CommandType { + if m != nil { + return m.CommandType + } + return nil +} + +func (x *Command) GetAddDestination() *AddDestinationCommand { + if x, ok := x.GetCommandType().(*Command_AddDestination); ok { + return x.AddDestination + } + return nil +} + +func (x *Command) GetRemoveDestination() *RemoveDestinationCommand { + if x, ok := x.GetCommandType().(*Command_RemoveDestination); ok { + return x.RemoveDestination + } + return nil +} + +func (x *Command) GetStartDestination() *StartDestinationCommand { + if x, ok := x.GetCommandType().(*Command_StartDestination); ok { + return x.StartDestination + } + return nil +} + +func (x *Command) GetStopDestination() *StopDestinationCommand { + if x, ok := x.GetCommandType().(*Command_StopDestination); ok { + return x.StopDestination + } + return nil +} + +func (x *Command) GetCloseOtherInstances() *CloseOtherInstancesCommand { + if x, ok := x.GetCommandType().(*Command_CloseOtherInstances); ok { + return x.CloseOtherInstances + } + return nil +} + +func (x *Command) GetQuit() *QuitCommand { + if x, ok := x.GetCommandType().(*Command_Quit); ok { + return x.Quit + } + return nil +} + +type isCommand_CommandType interface { + isCommand_CommandType() +} + +type Command_AddDestination struct { + AddDestination *AddDestinationCommand `protobuf:"bytes,1,opt,name=add_destination,json=addDestination,proto3,oneof"` +} + +type Command_RemoveDestination struct { + RemoveDestination *RemoveDestinationCommand `protobuf:"bytes,2,opt,name=remove_destination,json=removeDestination,proto3,oneof"` +} + +type Command_StartDestination struct { + StartDestination *StartDestinationCommand `protobuf:"bytes,3,opt,name=start_destination,json=startDestination,proto3,oneof"` +} + +type Command_StopDestination struct { + StopDestination *StopDestinationCommand `protobuf:"bytes,4,opt,name=stop_destination,json=stopDestination,proto3,oneof"` +} + +type Command_CloseOtherInstances struct { + CloseOtherInstances *CloseOtherInstancesCommand `protobuf:"bytes,5,opt,name=close_other_instances,json=closeOtherInstances,proto3,oneof"` +} + +type Command_Quit struct { + Quit *QuitCommand `protobuf:"bytes,6,opt,name=quit,proto3,oneof"` +} + +func (*Command_AddDestination) isCommand_CommandType() {} + +func (*Command_RemoveDestination) isCommand_CommandType() {} + +func (*Command_StartDestination) isCommand_CommandType() {} + +func (*Command_StopDestination) isCommand_CommandType() {} + +func (*Command_CloseOtherInstances) isCommand_CommandType() {} + +func (*Command_Quit) isCommand_CommandType() {} + +type AddDestinationCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *AddDestinationCommand) Reset() { + *x = AddDestinationCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDestinationCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDestinationCommand) ProtoMessage() {} + +func (x *AddDestinationCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[2] + 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 AddDestinationCommand.ProtoReflect.Descriptor instead. +func (*AddDestinationCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{2} +} + +func (x *AddDestinationCommand) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddDestinationCommand) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type RemoveDestinationCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *RemoveDestinationCommand) Reset() { + *x = RemoveDestinationCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDestinationCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDestinationCommand) ProtoMessage() {} + +func (x *RemoveDestinationCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_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 RemoveDestinationCommand.ProtoReflect.Descriptor instead. +func (*RemoveDestinationCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{3} +} + +func (x *RemoveDestinationCommand) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type StartDestinationCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *StartDestinationCommand) Reset() { + *x = StartDestinationCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartDestinationCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartDestinationCommand) ProtoMessage() {} + +func (x *StartDestinationCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_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 StartDestinationCommand.ProtoReflect.Descriptor instead. +func (*StartDestinationCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{4} +} + +func (x *StartDestinationCommand) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type StopDestinationCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *StopDestinationCommand) Reset() { + *x = StopDestinationCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopDestinationCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopDestinationCommand) ProtoMessage() {} + +func (x *StopDestinationCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[5] + 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 StopDestinationCommand.ProtoReflect.Descriptor instead. +func (*StopDestinationCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{5} +} + +func (x *StopDestinationCommand) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type CloseOtherInstancesCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CloseOtherInstancesCommand) Reset() { + *x = CloseOtherInstancesCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseOtherInstancesCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseOtherInstancesCommand) ProtoMessage() {} + +func (x *CloseOtherInstancesCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[6] + 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 CloseOtherInstancesCommand.ProtoReflect.Descriptor instead. +func (*CloseOtherInstancesCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{6} +} + +type QuitCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuitCommand) Reset() { + *x = QuitCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuitCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuitCommand) ProtoMessage() {} + +func (x *QuitCommand) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[7] + 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 QuitCommand.ProtoReflect.Descriptor instead. +func (*QuitCommand) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{7} +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to EventType: + // + // *Event_AppStateChanged + // *Event_DestinationStreamExited + // *Event_DestinationAdded + // *Event_AddDestinationFailed + // *Event_DestinationRemoved + // *Event_RemoveDestinationFailed + // *Event_StartDestinationFailed + // *Event_MediaServerStarted + // *Event_OtherInstanceDetected + // *Event_FatalError + EventType isEvent_EventType `protobuf_oneof:"event_type"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[8] + 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 Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{8} +} + +func (m *Event) GetEventType() isEvent_EventType { + if m != nil { + return m.EventType + } + return nil +} + +func (x *Event) GetAppStateChanged() *AppStateChangedEvent { + if x, ok := x.GetEventType().(*Event_AppStateChanged); ok { + return x.AppStateChanged + } + return nil +} + +func (x *Event) GetDestinationStreamExited() *DestinationStreamExitedEvent { + if x, ok := x.GetEventType().(*Event_DestinationStreamExited); ok { + return x.DestinationStreamExited + } + return nil +} + +func (x *Event) GetDestinationAdded() *DestinationAddedEvent { + if x, ok := x.GetEventType().(*Event_DestinationAdded); ok { + return x.DestinationAdded + } + return nil +} + +func (x *Event) GetAddDestinationFailed() *AddDestinationFailedEvent { + if x, ok := x.GetEventType().(*Event_AddDestinationFailed); ok { + return x.AddDestinationFailed + } + return nil +} + +func (x *Event) GetDestinationRemoved() *DestinationRemovedEvent { + if x, ok := x.GetEventType().(*Event_DestinationRemoved); ok { + return x.DestinationRemoved + } + return nil +} + +func (x *Event) GetRemoveDestinationFailed() *RemoveDestinationFailedEvent { + if x, ok := x.GetEventType().(*Event_RemoveDestinationFailed); ok { + return x.RemoveDestinationFailed + } + return nil +} + +func (x *Event) GetStartDestinationFailed() *StartDestinationFailedEvent { + if x, ok := x.GetEventType().(*Event_StartDestinationFailed); ok { + return x.StartDestinationFailed + } + return nil +} + +func (x *Event) GetMediaServerStarted() *MediaServerStartedEvent { + if x, ok := x.GetEventType().(*Event_MediaServerStarted); ok { + return x.MediaServerStarted + } + return nil +} + +func (x *Event) GetOtherInstanceDetected() *OtherInstanceDetectedEvent { + if x, ok := x.GetEventType().(*Event_OtherInstanceDetected); ok { + return x.OtherInstanceDetected + } + return nil +} + +func (x *Event) GetFatalError() *FatalErrorEvent { + if x, ok := x.GetEventType().(*Event_FatalError); ok { + return x.FatalError + } + return nil +} + +type isEvent_EventType interface { + isEvent_EventType() +} + +type Event_AppStateChanged struct { + AppStateChanged *AppStateChangedEvent `protobuf:"bytes,1,opt,name=app_state_changed,json=appStateChanged,proto3,oneof"` +} + +type Event_DestinationStreamExited struct { + DestinationStreamExited *DestinationStreamExitedEvent `protobuf:"bytes,2,opt,name=destination_stream_exited,json=destinationStreamExited,proto3,oneof"` +} + +type Event_DestinationAdded struct { + DestinationAdded *DestinationAddedEvent `protobuf:"bytes,3,opt,name=destination_added,json=destinationAdded,proto3,oneof"` +} + +type Event_AddDestinationFailed struct { + AddDestinationFailed *AddDestinationFailedEvent `protobuf:"bytes,4,opt,name=add_destination_failed,json=addDestinationFailed,proto3,oneof"` +} + +type Event_DestinationRemoved struct { + DestinationRemoved *DestinationRemovedEvent `protobuf:"bytes,5,opt,name=destination_removed,json=destinationRemoved,proto3,oneof"` +} + +type Event_RemoveDestinationFailed struct { + RemoveDestinationFailed *RemoveDestinationFailedEvent `protobuf:"bytes,6,opt,name=remove_destination_failed,json=removeDestinationFailed,proto3,oneof"` +} + +type Event_StartDestinationFailed struct { + StartDestinationFailed *StartDestinationFailedEvent `protobuf:"bytes,7,opt,name=start_destination_failed,json=startDestinationFailed,proto3,oneof"` +} + +type Event_MediaServerStarted struct { + MediaServerStarted *MediaServerStartedEvent `protobuf:"bytes,8,opt,name=media_server_started,json=mediaServerStarted,proto3,oneof"` +} + +type Event_OtherInstanceDetected struct { + OtherInstanceDetected *OtherInstanceDetectedEvent `protobuf:"bytes,9,opt,name=other_instance_detected,json=otherInstanceDetected,proto3,oneof"` +} + +type Event_FatalError struct { + FatalError *FatalErrorEvent `protobuf:"bytes,10,opt,name=fatal_error,json=fatalError,proto3,oneof"` +} + +func (*Event_AppStateChanged) isEvent_EventType() {} + +func (*Event_DestinationStreamExited) isEvent_EventType() {} + +func (*Event_DestinationAdded) isEvent_EventType() {} + +func (*Event_AddDestinationFailed) isEvent_EventType() {} + +func (*Event_DestinationRemoved) isEvent_EventType() {} + +func (*Event_RemoveDestinationFailed) isEvent_EventType() {} + +func (*Event_StartDestinationFailed) isEvent_EventType() {} + +func (*Event_MediaServerStarted) isEvent_EventType() {} + +func (*Event_OtherInstanceDetected) isEvent_EventType() {} + +func (*Event_FatalError) isEvent_EventType() {} + +type Container struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + HealthState string `protobuf:"bytes,3,opt,name=health_state,json=healthState,proto3" json:"health_state,omitempty"` + CpuPercent float64 `protobuf:"fixed64,4,opt,name=cpu_percent,json=cpuPercent,proto3" json:"cpu_percent,omitempty"` + MemoryUsageBytes uint64 `protobuf:"varint,5,opt,name=memory_usage_bytes,json=memoryUsageBytes,proto3" json:"memory_usage_bytes,omitempty"` + RxRate int32 `protobuf:"varint,6,opt,name=rx_rate,json=rxRate,proto3" json:"rx_rate,omitempty"` + TxRate int32 `protobuf:"varint,7,opt,name=tx_rate,json=txRate,proto3" json:"tx_rate,omitempty"` + RxSince *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=rx_since,json=rxSince,proto3" json:"rx_since,omitempty"` + ImageName string `protobuf:"bytes,9,opt,name=image_name,json=imageName,proto3" json:"image_name,omitempty"` + PullStatus string `protobuf:"bytes,10,opt,name=pull_status,json=pullStatus,proto3" json:"pull_status,omitempty"` + PullProgress string `protobuf:"bytes,11,opt,name=pull_progress,json=pullProgress,proto3" json:"pull_progress,omitempty"` + PullPercent int32 `protobuf:"varint,12,opt,name=pull_percent,json=pullPercent,proto3" json:"pull_percent,omitempty"` + RestartCount int32 `protobuf:"varint,13,opt,name=restart_count,json=restartCount,proto3" json:"restart_count,omitempty"` + ExitCode *int32 `protobuf:"varint,14,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` + Err string `protobuf:"bytes,15,opt,name=err,proto3" json:"err,omitempty"` +} + +func (x *Container) Reset() { + *x = Container{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Container) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Container) ProtoMessage() {} + +func (x *Container) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[9] + 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 Container.ProtoReflect.Descriptor instead. +func (*Container) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{9} +} + +func (x *Container) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Container) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Container) GetHealthState() string { + if x != nil { + return x.HealthState + } + return "" +} + +func (x *Container) GetCpuPercent() float64 { + if x != nil { + return x.CpuPercent + } + return 0 +} + +func (x *Container) GetMemoryUsageBytes() uint64 { + if x != nil { + return x.MemoryUsageBytes + } + return 0 +} + +func (x *Container) GetRxRate() int32 { + if x != nil { + return x.RxRate + } + return 0 +} + +func (x *Container) GetTxRate() int32 { + if x != nil { + return x.TxRate + } + return 0 +} + +func (x *Container) GetRxSince() *timestamppb.Timestamp { + if x != nil { + return x.RxSince + } + return nil +} + +func (x *Container) GetImageName() string { + if x != nil { + return x.ImageName + } + return "" +} + +func (x *Container) GetPullStatus() string { + if x != nil { + return x.PullStatus + } + return "" +} + +func (x *Container) GetPullProgress() string { + if x != nil { + return x.PullProgress + } + return "" +} + +func (x *Container) GetPullPercent() int32 { + if x != nil { + return x.PullPercent + } + return 0 +} + +func (x *Container) GetRestartCount() int32 { + if x != nil { + return x.RestartCount + } + return 0 +} + +func (x *Container) GetExitCode() int32 { + if x != nil && x.ExitCode != nil { + return *x.ExitCode + } + return 0 +} + +func (x *Container) GetErr() string { + if x != nil { + return x.Err + } + return "" +} + +type Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Container *Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"` + Live bool `protobuf:"varint,2,opt,name=live,proto3" json:"live,omitempty"` + LiveChangedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=live_changed_at,json=liveChangedAt,proto3" json:"live_changed_at,omitempty"` + Tracks []string `protobuf:"bytes,4,rep,name=tracks,proto3" json:"tracks,omitempty"` + ExitReason string `protobuf:"bytes,5,opt,name=exit_reason,json=exitReason,proto3" json:"exit_reason,omitempty"` +} + +func (x *Source) Reset() { + *x = Source{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Source) ProtoMessage() {} + +func (x *Source) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[10] + 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 Source.ProtoReflect.Descriptor instead. +func (*Source) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{10} +} + +func (x *Source) GetContainer() *Container { + if x != nil { + return x.Container + } + return nil +} + +func (x *Source) GetLive() bool { + if x != nil { + return x.Live + } + return false +} + +func (x *Source) GetLiveChangedAt() *timestamppb.Timestamp { + if x != nil { + return x.LiveChangedAt + } + return nil +} + +func (x *Source) GetTracks() []string { + if x != nil { + return x.Tracks + } + return nil +} + +func (x *Source) GetExitReason() string { + if x != nil { + return x.ExitReason + } + return "" +} + +type Destination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Container *Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"` + Status Destination_Status `protobuf:"varint,2,opt,name=status,proto3,enum=api.Destination_Status" json:"status,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Destination) Reset() { + *x = Destination{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Destination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Destination) ProtoMessage() {} + +func (x *Destination) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[11] + 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 Destination.ProtoReflect.Descriptor instead. +func (*Destination) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{11} +} + +func (x *Destination) GetContainer() *Container { + if x != nil { + return x.Container + } + return nil +} + +func (x *Destination) GetStatus() Destination_Status { + if x != nil { + return x.Status + } + return Destination_STATUS_OFF_AIR +} + +func (x *Destination) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Destination) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type BuildInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GoVersion string `protobuf:"bytes,1,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Commit string `protobuf:"bytes,3,opt,name=commit,proto3" json:"commit,omitempty"` + Date string `protobuf:"bytes,4,opt,name=date,proto3" json:"date,omitempty"` +} + +func (x *BuildInfo) Reset() { + *x = BuildInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildInfo) ProtoMessage() {} + +func (x *BuildInfo) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[12] + 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 BuildInfo.ProtoReflect.Descriptor instead. +func (*BuildInfo) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{12} +} + +func (x *BuildInfo) GetGoVersion() string { + if x != nil { + return x.GoVersion + } + return "" +} + +func (x *BuildInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *BuildInfo) GetCommit() string { + if x != nil { + return x.Commit + } + return "" +} + +func (x *BuildInfo) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +type AppState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Destinations []*Destination `protobuf:"bytes,2,rep,name=destinations,proto3" json:"destinations,omitempty"` + BuildInfo *BuildInfo `protobuf:"bytes,3,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"` +} + +func (x *AppState) Reset() { + *x = AppState{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppState) ProtoMessage() {} + +func (x *AppState) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[13] + 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 AppState.ProtoReflect.Descriptor instead. +func (*AppState) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{13} +} + +func (x *AppState) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *AppState) GetDestinations() []*Destination { + if x != nil { + return x.Destinations + } + return nil +} + +func (x *AppState) GetBuildInfo() *BuildInfo { + if x != nil { + return x.BuildInfo + } + return nil +} + +type AppStateChangedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppState *AppState `protobuf:"bytes,1,opt,name=app_state,json=appState,proto3" json:"app_state,omitempty"` +} + +func (x *AppStateChangedEvent) Reset() { + *x = AppStateChangedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppStateChangedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppStateChangedEvent) ProtoMessage() {} + +func (x *AppStateChangedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[14] + 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 AppStateChangedEvent.ProtoReflect.Descriptor instead. +func (*AppStateChangedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{14} +} + +func (x *AppStateChangedEvent) GetAppState() *AppState { + if x != nil { + return x.AppState + } + return nil +} + +type DestinationStreamExitedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *DestinationStreamExitedEvent) Reset() { + *x = DestinationStreamExitedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationStreamExitedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationStreamExitedEvent) ProtoMessage() {} + +func (x *DestinationStreamExitedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[15] + 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 DestinationStreamExitedEvent.ProtoReflect.Descriptor instead. +func (*DestinationStreamExitedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{15} +} + +func (x *DestinationStreamExitedEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DestinationStreamExitedEvent) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type DestinationAddedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *DestinationAddedEvent) Reset() { + *x = DestinationAddedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationAddedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationAddedEvent) ProtoMessage() {} + +func (x *DestinationAddedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[16] + 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 DestinationAddedEvent.ProtoReflect.Descriptor instead. +func (*DestinationAddedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{16} +} + +func (x *DestinationAddedEvent) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type AddDestinationFailedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *AddDestinationFailedEvent) Reset() { + *x = AddDestinationFailedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDestinationFailedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDestinationFailedEvent) ProtoMessage() {} + +func (x *AddDestinationFailedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[17] + 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 AddDestinationFailedEvent.ProtoReflect.Descriptor instead. +func (*AddDestinationFailedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{17} +} + +func (x *AddDestinationFailedEvent) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *AddDestinationFailedEvent) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type DestinationRemovedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *DestinationRemovedEvent) Reset() { + *x = DestinationRemovedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationRemovedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationRemovedEvent) ProtoMessage() {} + +func (x *DestinationRemovedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[18] + 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 DestinationRemovedEvent.ProtoReflect.Descriptor instead. +func (*DestinationRemovedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{18} +} + +func (x *DestinationRemovedEvent) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type RemoveDestinationFailedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *RemoveDestinationFailedEvent) Reset() { + *x = RemoveDestinationFailedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDestinationFailedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDestinationFailedEvent) ProtoMessage() {} + +func (x *RemoveDestinationFailedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[19] + 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 RemoveDestinationFailedEvent.ProtoReflect.Descriptor instead. +func (*RemoveDestinationFailedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{19} +} + +func (x *RemoveDestinationFailedEvent) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *RemoveDestinationFailedEvent) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type StartDestinationFailedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *StartDestinationFailedEvent) Reset() { + *x = StartDestinationFailedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartDestinationFailedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartDestinationFailedEvent) ProtoMessage() {} + +func (x *StartDestinationFailedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[20] + 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 StartDestinationFailedEvent.ProtoReflect.Descriptor instead. +func (*StartDestinationFailedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{20} +} + +func (x *StartDestinationFailedEvent) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *StartDestinationFailedEvent) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type MediaServerStartedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RtmpUrl string `protobuf:"bytes,1,opt,name=rtmp_url,json=rtmpUrl,proto3" json:"rtmp_url,omitempty"` + RtmpsUrl string `protobuf:"bytes,2,opt,name=rtmps_url,json=rtmpsUrl,proto3" json:"rtmps_url,omitempty"` +} + +func (x *MediaServerStartedEvent) Reset() { + *x = MediaServerStartedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MediaServerStartedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MediaServerStartedEvent) ProtoMessage() {} + +func (x *MediaServerStartedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[21] + 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 MediaServerStartedEvent.ProtoReflect.Descriptor instead. +func (*MediaServerStartedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{21} +} + +func (x *MediaServerStartedEvent) GetRtmpUrl() string { + if x != nil { + return x.RtmpUrl + } + return "" +} + +func (x *MediaServerStartedEvent) GetRtmpsUrl() string { + if x != nil { + return x.RtmpsUrl + } + return "" +} + +type OtherInstanceDetectedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OtherInstanceDetectedEvent) Reset() { + *x = OtherInstanceDetectedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OtherInstanceDetectedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OtherInstanceDetectedEvent) ProtoMessage() {} + +func (x *OtherInstanceDetectedEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[22] + 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 OtherInstanceDetectedEvent.ProtoReflect.Descriptor instead. +func (*OtherInstanceDetectedEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{22} +} + +type FatalErrorEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *FatalErrorEvent) Reset() { + *x = FatalErrorEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FatalErrorEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FatalErrorEvent) ProtoMessage() {} + +func (x *FatalErrorEvent) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[23] + 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 FatalErrorEvent.ProtoReflect.Descriptor instead. +func (*FatalErrorEvent) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{23} +} + +func (x *FatalErrorEvent) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_api_proto protoreflect.FileDescriptor + +var file_api_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x63, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x07, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xc6, 0x03, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x0f, 0x61, 0x64, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x64, 0x64, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x12, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, + 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x55, 0x0a, 0x15, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x74, 0x68, 0x65, 0x72, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x48, 0x00, 0x52, 0x13, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x71, 0x75, 0x69, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, 0x75, 0x69, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x71, 0x75, 0x69, 0x74, 0x42, + 0x0e, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x3d, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2c, + 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2b, 0x0a, 0x17, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2a, 0x0a, 0x16, 0x53, 0x74, 0x6f, + 0x70, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x22, 0xd8, 0x06, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x11, + 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x70, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x19, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x78, 0x69, 0x74, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x45, 0x78, 0x69, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x17, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x45, 0x78, 0x69, 0x74, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x14, 0x61, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x13, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x19, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x5c, 0x0a, 0x18, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x14, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, + 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x59, 0x0a, 0x17, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x15, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, + 0x0c, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xfd, 0x03, + 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x70, 0x75, 0x5f, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x63, 0x70, 0x75, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x74, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x73, 0x69, + 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x72, 0x78, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, + 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, + 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x72, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xc7, 0x01, + 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x69, + 0x76, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0d, 0x6c, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x69, + 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x42, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x4f, 0x46, 0x46, 0x5f, 0x41, 0x49, 0x52, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x02, + 0x22, 0x70, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, + 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x23, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x42, 0x0a, 0x14, 0x41, 0x70, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x2a, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x70, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x08, 0x61, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x48, 0x0a, + 0x1c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x45, 0x78, 0x69, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x22, 0x43, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2b, 0x0a, 0x17, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x6c, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x49, 0x0a, 0x1b, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x51, 0x0a, 0x17, 0x4d, 0x65, 0x64, 0x69, 0x61, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x74, 0x6d, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x74, 0x6d, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x74, 0x6d, 0x70, 0x73, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x74, 0x6d, 0x70, 0x73, 0x55, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x46, 0x61, 0x74, 0x61, + 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x3e, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x41, 0x50, 0x49, 0x12, 0x2f, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x2e, 0x6e, 0x65, 0x74, + 0x66, 0x6c, 0x75, 0x78, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x6f, 0x62, 0x2f, 0x6f, 0x63, 0x74, 0x6f, + 0x70, 0x6c, 0x65, 0x78, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_proto_rawDescOnce sync.Once + file_api_proto_rawDescData = file_api_proto_rawDesc +) + +func file_api_proto_rawDescGZIP() []byte { + file_api_proto_rawDescOnce.Do(func() { + file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData) + }) + return file_api_proto_rawDescData +} + +var file_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_api_proto_goTypes = []interface{}{ + (Destination_Status)(0), // 0: api.Destination.Status + (*Envelope)(nil), // 1: api.Envelope + (*Command)(nil), // 2: api.Command + (*AddDestinationCommand)(nil), // 3: api.AddDestinationCommand + (*RemoveDestinationCommand)(nil), // 4: api.RemoveDestinationCommand + (*StartDestinationCommand)(nil), // 5: api.StartDestinationCommand + (*StopDestinationCommand)(nil), // 6: api.StopDestinationCommand + (*CloseOtherInstancesCommand)(nil), // 7: api.CloseOtherInstancesCommand + (*QuitCommand)(nil), // 8: api.QuitCommand + (*Event)(nil), // 9: api.Event + (*Container)(nil), // 10: api.Container + (*Source)(nil), // 11: api.Source + (*Destination)(nil), // 12: api.Destination + (*BuildInfo)(nil), // 13: api.BuildInfo + (*AppState)(nil), // 14: api.AppState + (*AppStateChangedEvent)(nil), // 15: api.AppStateChangedEvent + (*DestinationStreamExitedEvent)(nil), // 16: api.DestinationStreamExitedEvent + (*DestinationAddedEvent)(nil), // 17: api.DestinationAddedEvent + (*AddDestinationFailedEvent)(nil), // 18: api.AddDestinationFailedEvent + (*DestinationRemovedEvent)(nil), // 19: api.DestinationRemovedEvent + (*RemoveDestinationFailedEvent)(nil), // 20: api.RemoveDestinationFailedEvent + (*StartDestinationFailedEvent)(nil), // 21: api.StartDestinationFailedEvent + (*MediaServerStartedEvent)(nil), // 22: api.MediaServerStartedEvent + (*OtherInstanceDetectedEvent)(nil), // 23: api.OtherInstanceDetectedEvent + (*FatalErrorEvent)(nil), // 24: api.FatalErrorEvent + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp +} +var file_api_proto_depIdxs = []int32{ + 2, // 0: api.Envelope.command:type_name -> api.Command + 9, // 1: api.Envelope.event:type_name -> api.Event + 3, // 2: api.Command.add_destination:type_name -> api.AddDestinationCommand + 4, // 3: api.Command.remove_destination:type_name -> api.RemoveDestinationCommand + 5, // 4: api.Command.start_destination:type_name -> api.StartDestinationCommand + 6, // 5: api.Command.stop_destination:type_name -> api.StopDestinationCommand + 7, // 6: api.Command.close_other_instances:type_name -> api.CloseOtherInstancesCommand + 8, // 7: api.Command.quit:type_name -> api.QuitCommand + 15, // 8: api.Event.app_state_changed:type_name -> api.AppStateChangedEvent + 16, // 9: api.Event.destination_stream_exited:type_name -> api.DestinationStreamExitedEvent + 17, // 10: api.Event.destination_added:type_name -> api.DestinationAddedEvent + 18, // 11: api.Event.add_destination_failed:type_name -> api.AddDestinationFailedEvent + 19, // 12: api.Event.destination_removed:type_name -> api.DestinationRemovedEvent + 20, // 13: api.Event.remove_destination_failed:type_name -> api.RemoveDestinationFailedEvent + 21, // 14: api.Event.start_destination_failed:type_name -> api.StartDestinationFailedEvent + 22, // 15: api.Event.media_server_started:type_name -> api.MediaServerStartedEvent + 23, // 16: api.Event.other_instance_detected:type_name -> api.OtherInstanceDetectedEvent + 24, // 17: api.Event.fatal_error:type_name -> api.FatalErrorEvent + 25, // 18: api.Container.rx_since:type_name -> google.protobuf.Timestamp + 10, // 19: api.Source.container:type_name -> api.Container + 25, // 20: api.Source.live_changed_at:type_name -> google.protobuf.Timestamp + 10, // 21: api.Destination.container:type_name -> api.Container + 0, // 22: api.Destination.status:type_name -> api.Destination.Status + 11, // 23: api.AppState.source:type_name -> api.Source + 12, // 24: api.AppState.destinations:type_name -> api.Destination + 13, // 25: api.AppState.build_info:type_name -> api.BuildInfo + 14, // 26: api.AppStateChangedEvent.app_state:type_name -> api.AppState + 1, // 27: api.InternalAPI.Communicate:input_type -> api.Envelope + 1, // 28: api.InternalAPI.Communicate:output_type -> api.Envelope + 28, // [28:29] is the sub-list for method output_type + 27, // [27:28] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name +} + +func init() { file_api_proto_init() } +func file_api_proto_init() { + if File_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Envelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Command); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDestinationCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDestinationCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartDestinationCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopDestinationCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseOtherInstancesCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuitCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Container); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Source); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Destination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BuildInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppStateChangedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationStreamExitedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationAddedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDestinationFailedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationRemovedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDestinationFailedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartDestinationFailedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MediaServerStartedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OtherInstanceDetectedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FatalErrorEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Envelope_Command)(nil), + (*Envelope_Event)(nil), + } + file_api_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Command_AddDestination)(nil), + (*Command_RemoveDestination)(nil), + (*Command_StartDestination)(nil), + (*Command_StopDestination)(nil), + (*Command_CloseOtherInstances)(nil), + (*Command_Quit)(nil), + } + file_api_proto_msgTypes[8].OneofWrappers = []interface{}{ + (*Event_AppStateChanged)(nil), + (*Event_DestinationStreamExited)(nil), + (*Event_DestinationAdded)(nil), + (*Event_AddDestinationFailed)(nil), + (*Event_DestinationRemoved)(nil), + (*Event_RemoveDestinationFailed)(nil), + (*Event_StartDestinationFailed)(nil), + (*Event_MediaServerStarted)(nil), + (*Event_OtherInstanceDetected)(nil), + (*Event_FatalError)(nil), + } + file_api_proto_msgTypes[9].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_proto_rawDesc, + NumEnums: 1, + NumMessages: 24, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_proto_goTypes, + DependencyIndexes: file_api_proto_depIdxs, + EnumInfos: file_api_proto_enumTypes, + MessageInfos: file_api_proto_msgTypes, + }.Build() + File_api_proto = out.File + file_api_proto_rawDesc = nil + file_api_proto_goTypes = nil + file_api_proto_depIdxs = nil +} diff --git a/internal/generated/grpc/proto/api_grpc.pb.go b/internal/generated/grpc/api_grpc.pb.go similarity index 91% rename from internal/generated/grpc/proto/api_grpc.pb.go rename to internal/generated/grpc/api_grpc.pb.go index 431ebaf..e7a22c2 100644 --- a/internal/generated/grpc/proto/api_grpc.pb.go +++ b/internal/generated/grpc/api_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.6 -// source: proto/api.proto +// - protoc v6.30.1 +// source: api.proto -package proto +package grpc import ( context "context" @@ -65,19 +65,21 @@ func (x *internalAPICommunicateClient) Recv() (*Envelope, error) { } // InternalAPIServer is the server API for InternalAPI service. -// All implementations should embed UnimplementedInternalAPIServer +// All implementations must embed UnimplementedInternalAPIServer // for forward compatibility type InternalAPIServer interface { Communicate(InternalAPI_CommunicateServer) error + mustEmbedUnimplementedInternalAPIServer() } -// UnimplementedInternalAPIServer should be embedded to have forward compatible implementations. +// UnimplementedInternalAPIServer must be embedded to have forward compatible implementations. type UnimplementedInternalAPIServer struct { } func (UnimplementedInternalAPIServer) Communicate(InternalAPI_CommunicateServer) error { return status.Errorf(codes.Unimplemented, "method Communicate not implemented") } +func (UnimplementedInternalAPIServer) mustEmbedUnimplementedInternalAPIServer() {} // UnsafeInternalAPIServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to InternalAPIServer will @@ -131,5 +133,5 @@ var InternalAPI_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "proto/api.proto", + Metadata: "api.proto", } diff --git a/internal/generated/grpc/proto/api.pb.go b/internal/generated/grpc/proto/api.pb.go deleted file mode 100644 index f308548..0000000 --- a/internal/generated/grpc/proto/api.pb.go +++ /dev/null @@ -1,1691 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.6 -// source: proto/api.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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) -) - -type Envelope struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Payload: - // - // *Envelope_Command - // *Envelope_Event - Payload isEnvelope_Payload `protobuf_oneof:"payload"` -} - -func (x *Envelope) Reset() { - *x = Envelope{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Envelope) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Envelope) ProtoMessage() {} - -func (x *Envelope) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[0] - 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 Envelope.ProtoReflect.Descriptor instead. -func (*Envelope) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{0} -} - -func (m *Envelope) GetPayload() isEnvelope_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (x *Envelope) GetCommand() *Command { - if x, ok := x.GetPayload().(*Envelope_Command); ok { - return x.Command - } - return nil -} - -func (x *Envelope) GetEvent() *Event { - if x, ok := x.GetPayload().(*Envelope_Event); ok { - return x.Event - } - return nil -} - -type isEnvelope_Payload interface { - isEnvelope_Payload() -} - -type Envelope_Command struct { - Command *Command `protobuf:"bytes,1,opt,name=command,proto3,oneof"` -} - -type Envelope_Event struct { - Event *Event `protobuf:"bytes,2,opt,name=event,proto3,oneof"` -} - -func (*Envelope_Command) isEnvelope_Payload() {} - -func (*Envelope_Event) isEnvelope_Payload() {} - -type Command struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to CommandType: - // - // *Command_AddDestinaion - // *Command_RemoveDestination - // *Command_StartDestination - // *Command_StopDestination - // *Command_CloseOtherInstances - // *Command_Quit - CommandType isCommand_CommandType `protobuf_oneof:"command_type"` -} - -func (x *Command) Reset() { - *x = Command{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Command) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Command) ProtoMessage() {} - -func (x *Command) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[1] - 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 Command.ProtoReflect.Descriptor instead. -func (*Command) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{1} -} - -func (m *Command) GetCommandType() isCommand_CommandType { - if m != nil { - return m.CommandType - } - return nil -} - -func (x *Command) GetAddDestinaion() *AddDestinationCommand { - if x, ok := x.GetCommandType().(*Command_AddDestinaion); ok { - return x.AddDestinaion - } - return nil -} - -func (x *Command) GetRemoveDestination() *RemoveDestinationCommand { - if x, ok := x.GetCommandType().(*Command_RemoveDestination); ok { - return x.RemoveDestination - } - return nil -} - -func (x *Command) GetStartDestination() *StartDestinationCommand { - if x, ok := x.GetCommandType().(*Command_StartDestination); ok { - return x.StartDestination - } - return nil -} - -func (x *Command) GetStopDestination() *StopDestinationCommand { - if x, ok := x.GetCommandType().(*Command_StopDestination); ok { - return x.StopDestination - } - return nil -} - -func (x *Command) GetCloseOtherInstances() *CloseOtherInstancesCommand { - if x, ok := x.GetCommandType().(*Command_CloseOtherInstances); ok { - return x.CloseOtherInstances - } - return nil -} - -func (x *Command) GetQuit() *QuitCommand { - if x, ok := x.GetCommandType().(*Command_Quit); ok { - return x.Quit - } - return nil -} - -type isCommand_CommandType interface { - isCommand_CommandType() -} - -type Command_AddDestinaion struct { - AddDestinaion *AddDestinationCommand `protobuf:"bytes,1,opt,name=add_destinaion,json=addDestinaion,proto3,oneof"` -} - -type Command_RemoveDestination struct { - RemoveDestination *RemoveDestinationCommand `protobuf:"bytes,2,opt,name=remove_destination,json=removeDestination,proto3,oneof"` -} - -type Command_StartDestination struct { - StartDestination *StartDestinationCommand `protobuf:"bytes,3,opt,name=start_destination,json=startDestination,proto3,oneof"` -} - -type Command_StopDestination struct { - StopDestination *StopDestinationCommand `protobuf:"bytes,4,opt,name=stop_destination,json=stopDestination,proto3,oneof"` -} - -type Command_CloseOtherInstances struct { - CloseOtherInstances *CloseOtherInstancesCommand `protobuf:"bytes,5,opt,name=close_other_instances,json=closeOtherInstances,proto3,oneof"` -} - -type Command_Quit struct { - Quit *QuitCommand `protobuf:"bytes,6,opt,name=quit,proto3,oneof"` -} - -func (*Command_AddDestinaion) isCommand_CommandType() {} - -func (*Command_RemoveDestination) isCommand_CommandType() {} - -func (*Command_StartDestination) isCommand_CommandType() {} - -func (*Command_StopDestination) isCommand_CommandType() {} - -func (*Command_CloseOtherInstances) isCommand_CommandType() {} - -func (*Command_Quit) isCommand_CommandType() {} - -type AddDestinationCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *AddDestinationCommand) Reset() { - *x = AddDestinationCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddDestinationCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddDestinationCommand) ProtoMessage() {} - -func (x *AddDestinationCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[2] - 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 AddDestinationCommand.ProtoReflect.Descriptor instead. -func (*AddDestinationCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{2} -} - -func (x *AddDestinationCommand) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AddDestinationCommand) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type RemoveDestinationCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *RemoveDestinationCommand) Reset() { - *x = RemoveDestinationCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDestinationCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDestinationCommand) ProtoMessage() {} - -func (x *RemoveDestinationCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_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 RemoveDestinationCommand.ProtoReflect.Descriptor instead. -func (*RemoveDestinationCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{3} -} - -func (x *RemoveDestinationCommand) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type StartDestinationCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *StartDestinationCommand) Reset() { - *x = StartDestinationCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartDestinationCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartDestinationCommand) ProtoMessage() {} - -func (x *StartDestinationCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_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 StartDestinationCommand.ProtoReflect.Descriptor instead. -func (*StartDestinationCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{4} -} - -func (x *StartDestinationCommand) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type StopDestinationCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *StopDestinationCommand) Reset() { - *x = StopDestinationCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StopDestinationCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopDestinationCommand) ProtoMessage() {} - -func (x *StopDestinationCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[5] - 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 StopDestinationCommand.ProtoReflect.Descriptor instead. -func (*StopDestinationCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{5} -} - -func (x *StopDestinationCommand) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type CloseOtherInstancesCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CloseOtherInstancesCommand) Reset() { - *x = CloseOtherInstancesCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloseOtherInstancesCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloseOtherInstancesCommand) ProtoMessage() {} - -func (x *CloseOtherInstancesCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[6] - 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 CloseOtherInstancesCommand.ProtoReflect.Descriptor instead. -func (*CloseOtherInstancesCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{6} -} - -type QuitCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QuitCommand) Reset() { - *x = QuitCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuitCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuitCommand) ProtoMessage() {} - -func (x *QuitCommand) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[7] - 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 QuitCommand.ProtoReflect.Descriptor instead. -func (*QuitCommand) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{7} -} - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EventType: - // - // *Event_AppStateChanged - // *Event_DestinationStreamExited - // *Event_DestinationAdded - // *Event_AddDestinationFailed - // *Event_DestinationRemoved - // *Event_RemoveDestinationFailed - // *Event_StartDestinationFailed - // *Event_MediaServerStarted - // *Event_OtherInstanceDetected - // *Event_FatalError - EventType isEvent_EventType `protobuf_oneof:"event_type"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[8] - 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 Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{8} -} - -func (m *Event) GetEventType() isEvent_EventType { - if m != nil { - return m.EventType - } - return nil -} - -func (x *Event) GetAppStateChanged() *AppStateChangedEvent { - if x, ok := x.GetEventType().(*Event_AppStateChanged); ok { - return x.AppStateChanged - } - return nil -} - -func (x *Event) GetDestinationStreamExited() *DestinationStreamExitedEvent { - if x, ok := x.GetEventType().(*Event_DestinationStreamExited); ok { - return x.DestinationStreamExited - } - return nil -} - -func (x *Event) GetDestinationAdded() *DestinationAddedEvent { - if x, ok := x.GetEventType().(*Event_DestinationAdded); ok { - return x.DestinationAdded - } - return nil -} - -func (x *Event) GetAddDestinationFailed() *AddDestinationFailedEvent { - if x, ok := x.GetEventType().(*Event_AddDestinationFailed); ok { - return x.AddDestinationFailed - } - return nil -} - -func (x *Event) GetDestinationRemoved() *DestinationRemovedEvent { - if x, ok := x.GetEventType().(*Event_DestinationRemoved); ok { - return x.DestinationRemoved - } - return nil -} - -func (x *Event) GetRemoveDestinationFailed() *RemoveDestinationFailedEvent { - if x, ok := x.GetEventType().(*Event_RemoveDestinationFailed); ok { - return x.RemoveDestinationFailed - } - return nil -} - -func (x *Event) GetStartDestinationFailed() *StartDestinationFailedEvent { - if x, ok := x.GetEventType().(*Event_StartDestinationFailed); ok { - return x.StartDestinationFailed - } - return nil -} - -func (x *Event) GetMediaServerStarted() *MediaServerStartedEvent { - if x, ok := x.GetEventType().(*Event_MediaServerStarted); ok { - return x.MediaServerStarted - } - return nil -} - -func (x *Event) GetOtherInstanceDetected() *OtherInstanceDetectedEvent { - if x, ok := x.GetEventType().(*Event_OtherInstanceDetected); ok { - return x.OtherInstanceDetected - } - return nil -} - -func (x *Event) GetFatalError() *FatalErrorEvent { - if x, ok := x.GetEventType().(*Event_FatalError); ok { - return x.FatalError - } - return nil -} - -type isEvent_EventType interface { - isEvent_EventType() -} - -type Event_AppStateChanged struct { - AppStateChanged *AppStateChangedEvent `protobuf:"bytes,1,opt,name=app_state_changed,json=appStateChanged,proto3,oneof"` -} - -type Event_DestinationStreamExited struct { - DestinationStreamExited *DestinationStreamExitedEvent `protobuf:"bytes,2,opt,name=destination_stream_exited,json=destinationStreamExited,proto3,oneof"` -} - -type Event_DestinationAdded struct { - DestinationAdded *DestinationAddedEvent `protobuf:"bytes,3,opt,name=destination_added,json=destinationAdded,proto3,oneof"` -} - -type Event_AddDestinationFailed struct { - AddDestinationFailed *AddDestinationFailedEvent `protobuf:"bytes,4,opt,name=add_destination_failed,json=addDestinationFailed,proto3,oneof"` -} - -type Event_DestinationRemoved struct { - DestinationRemoved *DestinationRemovedEvent `protobuf:"bytes,5,opt,name=destination_removed,json=destinationRemoved,proto3,oneof"` -} - -type Event_RemoveDestinationFailed struct { - RemoveDestinationFailed *RemoveDestinationFailedEvent `protobuf:"bytes,6,opt,name=remove_destination_failed,json=removeDestinationFailed,proto3,oneof"` -} - -type Event_StartDestinationFailed struct { - StartDestinationFailed *StartDestinationFailedEvent `protobuf:"bytes,7,opt,name=start_destination_failed,json=startDestinationFailed,proto3,oneof"` -} - -type Event_MediaServerStarted struct { - MediaServerStarted *MediaServerStartedEvent `protobuf:"bytes,8,opt,name=media_server_started,json=mediaServerStarted,proto3,oneof"` -} - -type Event_OtherInstanceDetected struct { - OtherInstanceDetected *OtherInstanceDetectedEvent `protobuf:"bytes,9,opt,name=other_instance_detected,json=otherInstanceDetected,proto3,oneof"` -} - -type Event_FatalError struct { - FatalError *FatalErrorEvent `protobuf:"bytes,10,opt,name=fatal_error,json=fatalError,proto3,oneof"` -} - -func (*Event_AppStateChanged) isEvent_EventType() {} - -func (*Event_DestinationStreamExited) isEvent_EventType() {} - -func (*Event_DestinationAdded) isEvent_EventType() {} - -func (*Event_AddDestinationFailed) isEvent_EventType() {} - -func (*Event_DestinationRemoved) isEvent_EventType() {} - -func (*Event_RemoveDestinationFailed) isEvent_EventType() {} - -func (*Event_StartDestinationFailed) isEvent_EventType() {} - -func (*Event_MediaServerStarted) isEvent_EventType() {} - -func (*Event_OtherInstanceDetected) isEvent_EventType() {} - -func (*Event_FatalError) isEvent_EventType() {} - -// TODO: complete -type AppStateChangedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AppStateChangedEvent) Reset() { - *x = AppStateChangedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AppStateChangedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AppStateChangedEvent) ProtoMessage() {} - -func (x *AppStateChangedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[9] - 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 AppStateChangedEvent.ProtoReflect.Descriptor instead. -func (*AppStateChangedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{9} -} - -type DestinationStreamExitedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *DestinationStreamExitedEvent) Reset() { - *x = DestinationStreamExitedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationStreamExitedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationStreamExitedEvent) ProtoMessage() {} - -func (x *DestinationStreamExitedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[10] - 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 DestinationStreamExitedEvent.ProtoReflect.Descriptor instead. -func (*DestinationStreamExitedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{10} -} - -func (x *DestinationStreamExitedEvent) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DestinationStreamExitedEvent) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type DestinationAddedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *DestinationAddedEvent) Reset() { - *x = DestinationAddedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationAddedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationAddedEvent) ProtoMessage() {} - -func (x *DestinationAddedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[11] - 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 DestinationAddedEvent.ProtoReflect.Descriptor instead. -func (*DestinationAddedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{11} -} - -func (x *DestinationAddedEvent) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type AddDestinationFailedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *AddDestinationFailedEvent) Reset() { - *x = AddDestinationFailedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddDestinationFailedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddDestinationFailedEvent) ProtoMessage() {} - -func (x *AddDestinationFailedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[12] - 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 AddDestinationFailedEvent.ProtoReflect.Descriptor instead. -func (*AddDestinationFailedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{12} -} - -func (x *AddDestinationFailedEvent) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *AddDestinationFailedEvent) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type DestinationRemovedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *DestinationRemovedEvent) Reset() { - *x = DestinationRemovedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationRemovedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationRemovedEvent) ProtoMessage() {} - -func (x *DestinationRemovedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[13] - 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 DestinationRemovedEvent.ProtoReflect.Descriptor instead. -func (*DestinationRemovedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{13} -} - -func (x *DestinationRemovedEvent) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type RemoveDestinationFailedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *RemoveDestinationFailedEvent) Reset() { - *x = RemoveDestinationFailedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDestinationFailedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDestinationFailedEvent) ProtoMessage() {} - -func (x *RemoveDestinationFailedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[14] - 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 RemoveDestinationFailedEvent.ProtoReflect.Descriptor instead. -func (*RemoveDestinationFailedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{14} -} - -func (x *RemoveDestinationFailedEvent) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *RemoveDestinationFailedEvent) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type StartDestinationFailedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *StartDestinationFailedEvent) Reset() { - *x = StartDestinationFailedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartDestinationFailedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartDestinationFailedEvent) ProtoMessage() {} - -func (x *StartDestinationFailedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[15] - 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 StartDestinationFailedEvent.ProtoReflect.Descriptor instead. -func (*StartDestinationFailedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{15} -} - -func (x *StartDestinationFailedEvent) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *StartDestinationFailedEvent) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type MediaServerStartedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RtmpUrl string `protobuf:"bytes,1,opt,name=rtmp_url,json=rtmpUrl,proto3" json:"rtmp_url,omitempty"` - RtmpsUrl string `protobuf:"bytes,2,opt,name=rtmps_url,json=rtmpsUrl,proto3" json:"rtmps_url,omitempty"` -} - -func (x *MediaServerStartedEvent) Reset() { - *x = MediaServerStartedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MediaServerStartedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MediaServerStartedEvent) ProtoMessage() {} - -func (x *MediaServerStartedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[16] - 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 MediaServerStartedEvent.ProtoReflect.Descriptor instead. -func (*MediaServerStartedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{16} -} - -func (x *MediaServerStartedEvent) GetRtmpUrl() string { - if x != nil { - return x.RtmpUrl - } - return "" -} - -func (x *MediaServerStartedEvent) GetRtmpsUrl() string { - if x != nil { - return x.RtmpsUrl - } - return "" -} - -type OtherInstanceDetectedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *OtherInstanceDetectedEvent) Reset() { - *x = OtherInstanceDetectedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OtherInstanceDetectedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OtherInstanceDetectedEvent) ProtoMessage() {} - -func (x *OtherInstanceDetectedEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[17] - 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 OtherInstanceDetectedEvent.ProtoReflect.Descriptor instead. -func (*OtherInstanceDetectedEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{17} -} - -type FatalErrorEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *FatalErrorEvent) Reset() { - *x = FatalErrorEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_api_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FatalErrorEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FatalErrorEvent) ProtoMessage() {} - -func (x *FatalErrorEvent) ProtoReflect() protoreflect.Message { - mi := &file_proto_api_proto_msgTypes[18] - 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 FatalErrorEvent.ProtoReflect.Descriptor instead. -func (*FatalErrorEvent) Descriptor() ([]byte, []int) { - return file_proto_api_proto_rawDescGZIP(), []int{18} -} - -func (x *FatalErrorEvent) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -var File_proto_api_proto protoreflect.FileDescriptor - -var file_proto_api_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x22, 0x63, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x05, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xc4, 0x03, 0x0a, 0x07, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x61, - 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x12, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x11, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x10, 0x73, 0x74, 0x6f, - 0x70, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x15, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x74, - 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x13, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x4f, 0x74, 0x68, 0x65, - 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x71, 0x75, - 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x51, - 0x75, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x71, 0x75, - 0x69, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x22, 0x2c, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, - 0x2b, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2a, 0x0a, 0x16, - 0x53, 0x74, 0x6f, 0x70, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x69, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xd8, 0x06, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x47, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x19, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, - 0x78, 0x69, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x78, 0x69, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x17, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x78, 0x69, 0x74, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x64, 0x64, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x14, 0x61, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x13, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x5f, 0x0a, - 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x5c, - 0x0a, 0x18, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x14, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x59, - 0x0a, 0x17, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x15, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x66, 0x61, 0x74, - 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x16, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x1c, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x69, - 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x43, 0x0a, - 0x19, 0x41, 0x64, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x2b, 0x0a, 0x17, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, - 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x45, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x51, - 0x0a, 0x17, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x74, 0x6d, - 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x74, 0x6d, - 0x70, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x74, 0x6d, 0x70, 0x73, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x74, 0x6d, 0x70, 0x73, 0x55, 0x72, - 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, - 0x27, 0x0a, 0x0f, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0x3e, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x50, 0x49, 0x12, 0x2f, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, 0x65, - 0x6c, 0x6f, 0x70, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x2e, - 0x6e, 0x65, 0x74, 0x66, 0x6c, 0x75, 0x78, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x6f, 0x62, 0x2f, 0x6f, - 0x63, 0x74, 0x6f, 0x70, 0x6c, 0x65, 0x78, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_api_proto_rawDescOnce sync.Once - file_proto_api_proto_rawDescData = file_proto_api_proto_rawDesc -) - -func file_proto_api_proto_rawDescGZIP() []byte { - file_proto_api_proto_rawDescOnce.Do(func() { - file_proto_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_api_proto_rawDescData) - }) - return file_proto_api_proto_rawDescData -} - -var file_proto_api_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_proto_api_proto_goTypes = []interface{}{ - (*Envelope)(nil), // 0: api.Envelope - (*Command)(nil), // 1: api.Command - (*AddDestinationCommand)(nil), // 2: api.AddDestinationCommand - (*RemoveDestinationCommand)(nil), // 3: api.RemoveDestinationCommand - (*StartDestinationCommand)(nil), // 4: api.StartDestinationCommand - (*StopDestinationCommand)(nil), // 5: api.StopDestinationCommand - (*CloseOtherInstancesCommand)(nil), // 6: api.CloseOtherInstancesCommand - (*QuitCommand)(nil), // 7: api.QuitCommand - (*Event)(nil), // 8: api.Event - (*AppStateChangedEvent)(nil), // 9: api.AppStateChangedEvent - (*DestinationStreamExitedEvent)(nil), // 10: api.DestinationStreamExitedEvent - (*DestinationAddedEvent)(nil), // 11: api.DestinationAddedEvent - (*AddDestinationFailedEvent)(nil), // 12: api.AddDestinationFailedEvent - (*DestinationRemovedEvent)(nil), // 13: api.DestinationRemovedEvent - (*RemoveDestinationFailedEvent)(nil), // 14: api.RemoveDestinationFailedEvent - (*StartDestinationFailedEvent)(nil), // 15: api.StartDestinationFailedEvent - (*MediaServerStartedEvent)(nil), // 16: api.MediaServerStartedEvent - (*OtherInstanceDetectedEvent)(nil), // 17: api.OtherInstanceDetectedEvent - (*FatalErrorEvent)(nil), // 18: api.FatalErrorEvent -} -var file_proto_api_proto_depIdxs = []int32{ - 1, // 0: api.Envelope.command:type_name -> api.Command - 8, // 1: api.Envelope.event:type_name -> api.Event - 2, // 2: api.Command.add_destinaion:type_name -> api.AddDestinationCommand - 3, // 3: api.Command.remove_destination:type_name -> api.RemoveDestinationCommand - 4, // 4: api.Command.start_destination:type_name -> api.StartDestinationCommand - 5, // 5: api.Command.stop_destination:type_name -> api.StopDestinationCommand - 6, // 6: api.Command.close_other_instances:type_name -> api.CloseOtherInstancesCommand - 7, // 7: api.Command.quit:type_name -> api.QuitCommand - 9, // 8: api.Event.app_state_changed:type_name -> api.AppStateChangedEvent - 10, // 9: api.Event.destination_stream_exited:type_name -> api.DestinationStreamExitedEvent - 11, // 10: api.Event.destination_added:type_name -> api.DestinationAddedEvent - 12, // 11: api.Event.add_destination_failed:type_name -> api.AddDestinationFailedEvent - 13, // 12: api.Event.destination_removed:type_name -> api.DestinationRemovedEvent - 14, // 13: api.Event.remove_destination_failed:type_name -> api.RemoveDestinationFailedEvent - 15, // 14: api.Event.start_destination_failed:type_name -> api.StartDestinationFailedEvent - 16, // 15: api.Event.media_server_started:type_name -> api.MediaServerStartedEvent - 17, // 16: api.Event.other_instance_detected:type_name -> api.OtherInstanceDetectedEvent - 18, // 17: api.Event.fatal_error:type_name -> api.FatalErrorEvent - 0, // 18: api.InternalAPI.Communicate:input_type -> api.Envelope - 0, // 19: api.InternalAPI.Communicate:output_type -> api.Envelope - 19, // [19:20] is the sub-list for method output_type - 18, // [18:19] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name -} - -func init() { file_proto_api_proto_init() } -func file_proto_api_proto_init() { - if File_proto_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Envelope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Command); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddDestinationCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDestinationCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartDestinationCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopDestinationCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloseOtherInstancesCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuitCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AppStateChangedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationStreamExitedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationAddedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddDestinationFailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationRemovedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDestinationFailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartDestinationFailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MediaServerStartedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OtherInstanceDetectedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FatalErrorEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_api_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Envelope_Command)(nil), - (*Envelope_Event)(nil), - } - file_proto_api_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Command_AddDestinaion)(nil), - (*Command_RemoveDestination)(nil), - (*Command_StartDestination)(nil), - (*Command_StopDestination)(nil), - (*Command_CloseOtherInstances)(nil), - (*Command_Quit)(nil), - } - file_proto_api_proto_msgTypes[8].OneofWrappers = []interface{}{ - (*Event_AppStateChanged)(nil), - (*Event_DestinationStreamExited)(nil), - (*Event_DestinationAdded)(nil), - (*Event_AddDestinationFailed)(nil), - (*Event_DestinationRemoved)(nil), - (*Event_RemoveDestinationFailed)(nil), - (*Event_StartDestinationFailed)(nil), - (*Event_MediaServerStarted)(nil), - (*Event_OtherInstanceDetected)(nil), - (*Event_FatalError)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_api_proto_goTypes, - DependencyIndexes: file_proto_api_proto_depIdxs, - MessageInfos: file_proto_api_proto_msgTypes, - }.Build() - File_proto_api_proto = out.File - file_proto_api_proto_rawDesc = nil - file_proto_api_proto_goTypes = nil - file_proto_api_proto_depIdxs = nil -} diff --git a/internal/server/protocol.go b/internal/server/protocol.go new file mode 100644 index 0000000..abb4e43 --- /dev/null +++ b/internal/server/protocol.go @@ -0,0 +1 @@ +package server diff --git a/internal/server/server.go b/internal/server/server.go index 7311bd2..239efe4 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -1,6 +1,6 @@ package server -import pb "git.netflux.io/rob/octoplex/internal/generated/grpc/proto" +import pb "git.netflux.io/rob/octoplex/internal/generated/grpc" type Server struct { pb.UnimplementedInternalAPIServer diff --git a/mise/config.toml b/mise/config.toml index 999624d..778ef6c 100644 --- a/mise/config.toml +++ b/mise/config.toml @@ -44,5 +44,5 @@ alias = "m" [tasks.generate_proto] description = "Generate gRPC files from proto" dir = "{{cwd}}" -run = "protoc --go_out=./generated/grpc --go-grpc_out=./generated/grpc proto/*.proto" +run = "protoc -I proto --go_out=paths=source_relative:internal/generated/grpc --go-grpc_out=paths=source_relative:internal/generated/grpc proto/api.proto" alias = "p" diff --git a/proto/api.proto b/proto/api.proto index 190ea64..c3fba15 100644 --- a/proto/api.proto +++ b/proto/api.proto @@ -2,7 +2,9 @@ syntax = "proto3"; package api; -option go_package = "git.netflux.io/rob/octoplex/internal/generated/grpc/proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "git.netflux.io/rob/octoplex/internal/generated/grpc"; service InternalAPI { rpc Communicate(stream Envelope) returns (stream Envelope); @@ -17,7 +19,7 @@ message Envelope { message Command { oneof command_type { - AddDestinationCommand add_destinaion = 1; + AddDestinationCommand add_destination = 1; RemoveDestinationCommand remove_destination = 2; StartDestinationCommand start_destination = 3; StopDestinationCommand stop_destination = 4; @@ -62,8 +64,61 @@ message Event { } } -// TODO: complete -message AppStateChangedEvent {} +message Container { + string id = 1; + string status = 2; + string health_state = 3; + double cpu_percent = 4; + uint64 memory_usage_bytes = 5; + int32 rx_rate = 6; + int32 tx_rate = 7; + google.protobuf.Timestamp rx_since = 8; + string image_name = 9; + string pull_status = 10; + string pull_progress = 11; + int32 pull_percent = 12; + int32 restart_count = 13; + optional int32 exit_code = 14; + string err = 15; +} + +message Source { + Container container = 1; + bool live = 2; + google.protobuf.Timestamp live_changed_at = 3; + repeated string tracks = 4; + string exit_reason = 5; +} + +message Destination { + enum Status { + STATUS_OFF_AIR = 0; + STATUS_STARTING = 1; + STATUS_LIVE = 2; + } + + Container container = 1; + Status status = 2; + string name = 3; + string url = 4; +} + +message BuildInfo { + string go_version = 1; + string version = 2; + string commit = 3; + string date = 4; +} + +message AppState { + Source source = 1; + repeated Destination destinations = 2; + BuildInfo build_info = 3; +} + +message AppStateChangedEvent { + AppState app_state = 1; +} message DestinationStreamExitedEvent { string name = 1; @@ -90,7 +145,7 @@ message RemoveDestinationFailedEvent { message StartDestinationFailedEvent { string url = 1; - string error = 2; + string message = 2; } message MediaServerStartedEvent { @@ -101,5 +156,5 @@ message MediaServerStartedEvent { message OtherInstanceDetectedEvent {} message FatalErrorEvent { - string error = 1; + string message = 1; }