rpcpb

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevel_name = map[int32]string{
		0: "null",
		1: "LevelDebug",
		2: "LevelInfo",
		3: "LevelSuccess",
		4: "LevelWarn",
		5: "LevelError",
		6: "LevelFatal",
	}
	LogLevel_value = map[string]int32{
		"null":         0,
		"LevelDebug":   1,
		"LevelInfo":    2,
		"LevelSuccess": 3,
		"LevelWarn":    4,
		"LevelError":   5,
		"LevelFatal":   6,
	}
)

Enum value maps for LogLevel.

View Source
var Builder_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpcpb.Builder",
	HandlerType: (*BuilderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCommands",
			Handler:    _Builder_GetCommands_Handler,
		},
		{
			MethodName: "GetOptions",
			Handler:    _Builder_GetOptions_Handler,
		},
		{
			MethodName: "BuildAgent",
			Handler:    _Builder_BuildAgent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rpcpb/services.proto",
}

Builder_ServiceDesc is the grpc.ServiceDesc for Builder service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_rpcpb_services_proto protoreflect.FileDescriptor
View Source
var Monarch_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpcpb.Monarch",
	HandlerType: (*MonarchServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Players",
			Handler:    _Monarch_Players_Handler,
		},
		{
			MethodName: "Agents",
			Handler:    _Monarch_Agents_Handler,
		},
		{
			MethodName: "NewAgent",
			Handler:    _Monarch_NewAgent_Handler,
		},
		{
			MethodName: "RmAgents",
			Handler:    _Monarch_RmAgents_Handler,
		},
		{
			MethodName: "Builders",
			Handler:    _Monarch_Builders_Handler,
		},
		{
			MethodName: "Profiles",
			Handler:    _Monarch_Profiles_Handler,
		},
		{
			MethodName: "SaveProfile",
			Handler:    _Monarch_SaveProfile_Handler,
		},
		{
			MethodName: "LoadProfile",
			Handler:    _Monarch_LoadProfile_Handler,
		},
		{
			MethodName: "RmProfiles",
			Handler:    _Monarch_RmProfiles_Handler,
		},
		{
			MethodName: "Options",
			Handler:    _Monarch_Options_Handler,
		},
		{
			MethodName: "Build",
			Handler:    _Monarch_Build_Handler,
		},
		{
			MethodName: "EndBuild",
			Handler:    _Monarch_EndBuild_Handler,
		},
		{
			MethodName: "HttpOpen",
			Handler:    _Monarch_HttpOpen_Handler,
		},
		{
			MethodName: "HttpClose",
			Handler:    _Monarch_HttpClose_Handler,
		},
		{
			MethodName: "HttpsOpen",
			Handler:    _Monarch_HttpsOpen_Handler,
		},
		{
			MethodName: "HttpsClose",
			Handler:    _Monarch_HttpsClose_Handler,
		},
		{
			MethodName: "TcpOpen",
			Handler:    _Monarch_TcpOpen_Handler,
		},
		{
			MethodName: "TcpClose",
			Handler:    _Monarch_TcpClose_Handler,
		},
		{
			MethodName: "Sessions",
			Handler:    _Monarch_Sessions_Handler,
		},
		{
			MethodName: "RmSession",
			Handler:    _Monarch_RmSession_Handler,
		},
		{
			MethodName: "LockSession",
			Handler:    _Monarch_LockSession_Handler,
		},
		{
			MethodName: "FreeSession",
			Handler:    _Monarch_FreeSession_Handler,
		},
		{
			MethodName: "Commands",
			Handler:    _Monarch_Commands_Handler,
		},
		{
			MethodName: "Send",
			Handler:    _Monarch_Send_Handler,
		},
		{
			MethodName: "StageView",
			Handler:    _Monarch_StageView_Handler,
		},
		{
			MethodName: "StageAdd",
			Handler:    _Monarch_StageAdd_Handler,
		},
		{
			MethodName: "StageLocal",
			Handler:    _Monarch_StageLocal_Handler,
		},
		{
			MethodName: "Unstage",
			Handler:    _Monarch_Unstage_Handler,
		},
		{
			MethodName: "SendMessage",
			Handler:    _Monarch_SendMessage_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Install",
			Handler:       _Monarch_Install_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Uninstall",
			Handler:       _Monarch_Uninstall_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Notify",
			Handler:       _Monarch_Notify_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetMessages",
			Handler:       _Monarch_GetMessages_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "rpcpb/services.proto",
}

Monarch_ServiceDesc is the grpc.ServiceDesc for Monarch service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterBuilderServer

func RegisterBuilderServer(s grpc.ServiceRegistrar, srv BuilderServer)

func RegisterMonarchServer

func RegisterMonarchServer(s grpc.ServiceRegistrar, srv MonarchServer)

Types

type BuilderClient

type BuilderClient interface {
	GetCommands(ctx context.Context, in *builderpb.DescriptionsRequest, opts ...grpc.CallOption) (*builderpb.DescriptionsReply, error)
	GetOptions(ctx context.Context, in *builderpb.OptionsRequest, opts ...grpc.CallOption) (*builderpb.OptionsReply, error)
	BuildAgent(ctx context.Context, in *builderpb.BuildRequest, opts ...grpc.CallOption) (*builderpb.BuildReply, error)
}

BuilderClient is the client API for Builder service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewBuilderClient

func NewBuilderClient(cc grpc.ClientConnInterface) BuilderClient

type BuilderServer

type BuilderServer interface {
	GetCommands(context.Context, *builderpb.DescriptionsRequest) (*builderpb.DescriptionsReply, error)
	GetOptions(context.Context, *builderpb.OptionsRequest) (*builderpb.OptionsReply, error)
	BuildAgent(context.Context, *builderpb.BuildRequest) (*builderpb.BuildReply, error)
	// contains filtered or unexported methods
}

BuilderServer is the server API for Builder service. All implementations must embed UnimplementedBuilderServer for forward compatibility

type LogLevel

type LogLevel int32
const (
	LogLevel_null         LogLevel = 0
	LogLevel_LevelDebug   LogLevel = 1
	LogLevel_LevelInfo    LogLevel = 2
	LogLevel_LevelSuccess LogLevel = 3
	LogLevel_LevelWarn    LogLevel = 4
	LogLevel_LevelError   LogLevel = 5
	LogLevel_LevelFatal   LogLevel = 6
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

func (LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

type Message

type Message struct {
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	To   string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
	Msg  string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetFrom

func (x *Message) GetFrom() string

func (*Message) GetMsg

func (x *Message) GetMsg() string

func (*Message) GetRole

func (x *Message) GetRole() string

func (*Message) GetTo

func (x *Message) GetTo() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MonarchClient

type MonarchClient interface {
	Players(ctx context.Context, in *clientpb.PlayerRequest, opts ...grpc.CallOption) (*clientpb.Players, error)
	Agents(ctx context.Context, in *clientpb.AgentRequest, opts ...grpc.CallOption) (*clientpb.Agents, error)
	NewAgent(ctx context.Context, in *clientpb.Agent, opts ...grpc.CallOption) (*clientpb.Empty, error)
	RmAgents(ctx context.Context, in *clientpb.AgentRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	Builders(ctx context.Context, in *clientpb.BuilderRequest, opts ...grpc.CallOption) (*clientpb.Builders, error)
	Profiles(ctx context.Context, in *clientpb.ProfileRequest, opts ...grpc.CallOption) (*clientpb.Profiles, error)
	SaveProfile(ctx context.Context, in *clientpb.SaveProfileRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	LoadProfile(ctx context.Context, in *clientpb.SaveProfileRequest, opts ...grpc.CallOption) (*clientpb.ProfileData, error)
	RmProfiles(ctx context.Context, in *clientpb.ProfileRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	Options(ctx context.Context, in *builderpb.OptionsRequest, opts ...grpc.CallOption) (*builderpb.OptionsReply, error)
	Build(ctx context.Context, in *builderpb.BuildRequest, opts ...grpc.CallOption) (*clientpb.BuildReply, error)
	EndBuild(ctx context.Context, in *builderpb.BuildRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	Install(ctx context.Context, in *clientpb.InstallRequest, opts ...grpc.CallOption) (Monarch_InstallClient, error)
	Uninstall(ctx context.Context, in *clientpb.UninstallRequest, opts ...grpc.CallOption) (Monarch_UninstallClient, error)
	HttpOpen(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*Notification, error)
	HttpClose(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error)
	HttpsOpen(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*Notification, error)
	HttpsClose(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error)
	TcpOpen(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*Notification, error)
	TcpClose(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error)
	Sessions(ctx context.Context, in *clientpb.SessionsRequest, opts ...grpc.CallOption) (*clientpb.Sessions, error)
	RmSession(ctx context.Context, in *clientpb.SessionsRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	LockSession(ctx context.Context, in *clientpb.LockSessionRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	FreeSession(ctx context.Context, in *clientpb.FreeSessionRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	Commands(ctx context.Context, in *builderpb.DescriptionsRequest, opts ...grpc.CallOption) (*builderpb.DescriptionsReply, error)
	Send(ctx context.Context, in *clientpb.HTTPRequest, opts ...grpc.CallOption) (*clientpb.HTTPResponse, error)
	StageView(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Stage, error)
	StageAdd(ctx context.Context, in *clientpb.StageAddRequest, opts ...grpc.CallOption) (*Notification, error)
	StageLocal(ctx context.Context, in *clientpb.StageLocalRequest, opts ...grpc.CallOption) (*Notification, error)
	Unstage(ctx context.Context, in *clientpb.UnstageRequest, opts ...grpc.CallOption) (*clientpb.Empty, error)
	// Notify used for general notifications - likely run from a goroutine
	Notify(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_NotifyClient, error)
	GetMessages(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_GetMessagesClient, error)
	SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*clientpb.Empty, error)
}

MonarchClient is the client API for Monarch service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMonarchClient

func NewMonarchClient(cc grpc.ClientConnInterface) MonarchClient

type MonarchServer

type MonarchServer interface {
	Players(context.Context, *clientpb.PlayerRequest) (*clientpb.Players, error)
	Agents(context.Context, *clientpb.AgentRequest) (*clientpb.Agents, error)
	NewAgent(context.Context, *clientpb.Agent) (*clientpb.Empty, error)
	RmAgents(context.Context, *clientpb.AgentRequest) (*clientpb.Empty, error)
	Builders(context.Context, *clientpb.BuilderRequest) (*clientpb.Builders, error)
	Profiles(context.Context, *clientpb.ProfileRequest) (*clientpb.Profiles, error)
	SaveProfile(context.Context, *clientpb.SaveProfileRequest) (*clientpb.Empty, error)
	LoadProfile(context.Context, *clientpb.SaveProfileRequest) (*clientpb.ProfileData, error)
	RmProfiles(context.Context, *clientpb.ProfileRequest) (*clientpb.Empty, error)
	Options(context.Context, *builderpb.OptionsRequest) (*builderpb.OptionsReply, error)
	Build(context.Context, *builderpb.BuildRequest) (*clientpb.BuildReply, error)
	EndBuild(context.Context, *builderpb.BuildRequest) (*clientpb.Empty, error)
	Install(*clientpb.InstallRequest, Monarch_InstallServer) error
	Uninstall(*clientpb.UninstallRequest, Monarch_UninstallServer) error
	HttpOpen(context.Context, *clientpb.Empty) (*Notification, error)
	HttpClose(context.Context, *clientpb.Empty) (*clientpb.Empty, error)
	HttpsOpen(context.Context, *clientpb.Empty) (*Notification, error)
	HttpsClose(context.Context, *clientpb.Empty) (*clientpb.Empty, error)
	TcpOpen(context.Context, *clientpb.Empty) (*Notification, error)
	TcpClose(context.Context, *clientpb.Empty) (*clientpb.Empty, error)
	Sessions(context.Context, *clientpb.SessionsRequest) (*clientpb.Sessions, error)
	RmSession(context.Context, *clientpb.SessionsRequest) (*clientpb.Empty, error)
	LockSession(context.Context, *clientpb.LockSessionRequest) (*clientpb.Empty, error)
	FreeSession(context.Context, *clientpb.FreeSessionRequest) (*clientpb.Empty, error)
	Commands(context.Context, *builderpb.DescriptionsRequest) (*builderpb.DescriptionsReply, error)
	Send(context.Context, *clientpb.HTTPRequest) (*clientpb.HTTPResponse, error)
	StageView(context.Context, *clientpb.Empty) (*clientpb.Stage, error)
	StageAdd(context.Context, *clientpb.StageAddRequest) (*Notification, error)
	StageLocal(context.Context, *clientpb.StageLocalRequest) (*Notification, error)
	Unstage(context.Context, *clientpb.UnstageRequest) (*clientpb.Empty, error)
	// Notify used for general notifications - likely run from a goroutine
	Notify(*clientpb.Empty, Monarch_NotifyServer) error
	GetMessages(*clientpb.Empty, Monarch_GetMessagesServer) error
	SendMessage(context.Context, *Message) (*clientpb.Empty, error)
	// contains filtered or unexported methods
}

MonarchServer is the server API for Monarch service. All implementations must embed UnimplementedMonarchServer for forward compatibility

type Monarch_GetMessagesClient

type Monarch_GetMessagesClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type Monarch_GetMessagesServer

type Monarch_GetMessagesServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type Monarch_InstallClient

type Monarch_InstallClient interface {
	Recv() (*Notification, error)
	grpc.ClientStream
}

type Monarch_InstallServer

type Monarch_InstallServer interface {
	Send(*Notification) error
	grpc.ServerStream
}

type Monarch_NotifyClient

type Monarch_NotifyClient interface {
	Recv() (*Notification, error)
	grpc.ClientStream
}

type Monarch_NotifyServer

type Monarch_NotifyServer interface {
	Send(*Notification) error
	grpc.ServerStream
}

type Monarch_UninstallClient

type Monarch_UninstallClient interface {
	Recv() (*Notification, error)
	grpc.ClientStream
}

type Monarch_UninstallServer

type Monarch_UninstallServer interface {
	Send(*Notification) error
	grpc.ServerStream
}

type Notification

type Notification struct {
	LogLevel LogLevel `protobuf:"varint,1,opt,name=log_level,json=logLevel,proto3,enum=rpcpb.LogLevel" json:"log_level,omitempty"`
	Msg      string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

func (*Notification) Descriptor() ([]byte, []int)

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetLogLevel

func (x *Notification) GetLogLevel() LogLevel

func (*Notification) GetMsg

func (x *Notification) GetMsg() string

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

func (x *Notification) ProtoReflect() protoreflect.Message

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type UnimplementedBuilderServer

type UnimplementedBuilderServer struct {
}

UnimplementedBuilderServer must be embedded to have forward compatible implementations.

func (UnimplementedBuilderServer) BuildAgent

func (UnimplementedBuilderServer) GetOptions

type UnimplementedMonarchServer

type UnimplementedMonarchServer struct {
}

UnimplementedMonarchServer must be embedded to have forward compatible implementations.

func (UnimplementedMonarchServer) Agents

func (UnimplementedMonarchServer) Build

func (UnimplementedMonarchServer) Builders

func (UnimplementedMonarchServer) EndBuild

func (UnimplementedMonarchServer) FreeSession

func (UnimplementedMonarchServer) GetMessages

func (UnimplementedMonarchServer) HttpClose

func (UnimplementedMonarchServer) HttpOpen

func (UnimplementedMonarchServer) HttpsClose

func (UnimplementedMonarchServer) HttpsOpen

func (UnimplementedMonarchServer) Install

func (UnimplementedMonarchServer) LoadProfile

func (UnimplementedMonarchServer) LockSession

func (UnimplementedMonarchServer) NewAgent

func (UnimplementedMonarchServer) Notify

func (UnimplementedMonarchServer) Options

func (UnimplementedMonarchServer) Players

func (UnimplementedMonarchServer) Profiles

func (UnimplementedMonarchServer) RmAgents

func (UnimplementedMonarchServer) RmProfiles

func (UnimplementedMonarchServer) RmSession

func (UnimplementedMonarchServer) SaveProfile

func (UnimplementedMonarchServer) Send

func (UnimplementedMonarchServer) SendMessage

func (UnimplementedMonarchServer) Sessions

func (UnimplementedMonarchServer) StageAdd

func (UnimplementedMonarchServer) StageLocal

func (UnimplementedMonarchServer) StageView

func (UnimplementedMonarchServer) TcpClose

func (UnimplementedMonarchServer) TcpOpen

func (UnimplementedMonarchServer) Uninstall

func (UnimplementedMonarchServer) Unstage

type UnsafeBuilderServer

type UnsafeBuilderServer interface {
	// contains filtered or unexported methods
}

UnsafeBuilderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BuilderServer will result in compilation errors.

type UnsafeMonarchServer

type UnsafeMonarchServer interface {
	// contains filtered or unexported methods
}

UnsafeMonarchServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MonarchServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL