proto

package
v0.0.0-...-523022b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Controller_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Controller",
	HandlerType: (*ControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Stop",
			Handler:    _Controller_Stop_Handler,
		},
		{
			MethodName: "PushVersion",
			Handler:    _Controller_PushVersion_Handler,
		},
		{
			MethodName: "GetVersion",
			Handler:    _Controller_GetVersion_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Command",
			Handler:       _Controller_Command_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "plugin.proto",
}

Controller_ServiceDesc is the grpc.ServiceDesc for Controller 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 Datasource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Datasource",
	HandlerType: (*DatasourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StopRecord",
			Handler:    _Datasource_StopRecord_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Datasource_Stop_Handler,
		},
		{
			MethodName: "PushVersion",
			Handler:    _Datasource_PushVersion_Handler,
		},
		{
			MethodName: "GetVersion",
			Handler:    _Datasource_GetVersion_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StartRecord",
			Handler:       _Datasource_StartRecord_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "plugin.proto",
}

Datasource_ServiceDesc is the grpc.ServiceDesc for Datasource 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_plugin_proto protoreflect.FileDescriptor

Functions

func RegisterControllerServer

func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer)

func RegisterDatasourceServer

func RegisterDatasourceServer(s grpc.ServiceRegistrar, srv DatasourceServer)

Types

type ControllerClient

type ControllerClient interface {
	// Stop stops any plugin subprocesses and prepares it for a graceful shutdown.
	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// Command sends a command in byte format to the plugin to initiate a process. It allows a stream of data to be returned.
	Command(ctx context.Context, in *Frame, opts ...grpc.CallOption) (Controller_CommandClient, error)
	// PushVersion pushes the version of Laniakea to the plugin.
	PushVersion(ctx context.Context, in *VersionNumber, opts ...grpc.CallOption) (*Empty, error)
	// GetVersion retrieves the version number from the plugin.
	GetVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionNumber, error)
}

ControllerClient is the client API for Controller 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 NewControllerClient

func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient

type ControllerServer

type ControllerServer interface {
	// Stop stops any plugin subprocesses and prepares it for a graceful shutdown.
	Stop(context.Context, *Empty) (*Empty, error)
	// Command sends a command in byte format to the plugin to initiate a process. It allows a stream of data to be returned.
	Command(*Frame, Controller_CommandServer) error
	// PushVersion pushes the version of Laniakea to the plugin.
	PushVersion(context.Context, *VersionNumber) (*Empty, error)
	// GetVersion retrieves the version number from the plugin.
	GetVersion(context.Context, *Empty) (*VersionNumber, error)
	// contains filtered or unexported methods
}

ControllerServer is the server API for Controller service. All implementations must embed UnimplementedControllerServer for forward compatibility

type Controller_CommandClient

type Controller_CommandClient interface {
	Recv() (*Frame, error)
	grpc.ClientStream
}

type Controller_CommandServer

type Controller_CommandServer interface {
	Send(*Frame) error
	grpc.ServerStream
}

type DatasourceClient

type DatasourceClient interface {
	// StartRecord starts the data recording process for a given plugin.
	StartRecord(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Datasource_StartRecordClient, error)
	// StopRecord stops the data recording process but does not shut down the plugin.
	StopRecord(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// Stop stops the data recording process if the plugin is recording and prepares it for a graceful shutdown.
	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// PushVersion pushes the version of Laniakea to the plugin.
	PushVersion(ctx context.Context, in *VersionNumber, opts ...grpc.CallOption) (*Empty, error)
	// GetVersion retrieves the version number from the plugin.
	GetVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionNumber, error)
}

DatasourceClient is the client API for Datasource 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 NewDatasourceClient

func NewDatasourceClient(cc grpc.ClientConnInterface) DatasourceClient

type DatasourceServer

type DatasourceServer interface {
	// StartRecord starts the data recording process for a given plugin.
	StartRecord(*Empty, Datasource_StartRecordServer) error
	// StopRecord stops the data recording process but does not shut down the plugin.
	StopRecord(context.Context, *Empty) (*Empty, error)
	// Stop stops the data recording process if the plugin is recording and prepares it for a graceful shutdown.
	Stop(context.Context, *Empty) (*Empty, error)
	// PushVersion pushes the version of Laniakea to the plugin.
	PushVersion(context.Context, *VersionNumber) (*Empty, error)
	// GetVersion retrieves the version number from the plugin.
	GetVersion(context.Context, *Empty) (*VersionNumber, error)
	// contains filtered or unexported methods
}

DatasourceServer is the server API for Datasource service. All implementations must embed UnimplementedDatasourceServer for forward compatibility

type Datasource_StartRecordClient

type Datasource_StartRecordClient interface {
	Recv() (*Frame, error)
	grpc.ClientStream
}

type Datasource_StartRecordServer

type Datasource_StartRecordServer interface {
	Send(*Frame) error
	grpc.ServerStream
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Frame

type Frame struct {

	// The name of the source of this Frame
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// A MIME-like type indicating the kind of content within the payload field
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// The UNIX millisecond timestamp of this frame
	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The actual payload data in bytes. Limit is 2^32
	Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Frame) Descriptor deprecated

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

Deprecated: Use Frame.ProtoReflect.Descriptor instead.

func (*Frame) GetPayload

func (x *Frame) GetPayload() []byte

func (*Frame) GetSource

func (x *Frame) GetSource() string

func (*Frame) GetTimestamp

func (x *Frame) GetTimestamp() int64

func (*Frame) GetType

func (x *Frame) GetType() string

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) ProtoReflect

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

func (*Frame) Reset

func (x *Frame) Reset()

func (*Frame) String

func (x *Frame) String() string

type UnimplementedControllerServer

type UnimplementedControllerServer struct {
}

UnimplementedControllerServer must be embedded to have forward compatible implementations.

func (UnimplementedControllerServer) Command

func (UnimplementedControllerServer) GetVersion

func (UnimplementedControllerServer) PushVersion

func (UnimplementedControllerServer) Stop

type UnimplementedDatasourceServer

type UnimplementedDatasourceServer struct {
}

UnimplementedDatasourceServer must be embedded to have forward compatible implementations.

func (UnimplementedDatasourceServer) GetVersion

func (UnimplementedDatasourceServer) PushVersion

func (UnimplementedDatasourceServer) StartRecord

func (UnimplementedDatasourceServer) Stop

func (UnimplementedDatasourceServer) StopRecord

type UnsafeControllerServer

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

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

type UnsafeDatasourceServer

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

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

type VersionNumber

type VersionNumber struct {

	// version number string
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*VersionNumber) Descriptor deprecated

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

Deprecated: Use VersionNumber.ProtoReflect.Descriptor instead.

func (*VersionNumber) GetVersion

func (x *VersionNumber) GetVersion() string

func (*VersionNumber) ProtoMessage

func (*VersionNumber) ProtoMessage()

func (*VersionNumber) ProtoReflect

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

func (*VersionNumber) Reset

func (x *VersionNumber) Reset()

func (*VersionNumber) String

func (x *VersionNumber) String() string

Jump to

Keyboard shortcuts

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