plugin

package
v0.0.0-...-8d028ec Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCBroker_StartStream_FullMethodName = "/plugin.GRPCBroker/StartStream"
)
View Source
const (
	GRPCController_Shutdown_FullMethodName = "/plugin.GRPCController/Shutdown"
)
View Source
const (
	GRPCStdio_StreamStdio_FullMethodName = "/plugin.GRPCStdio/StreamStdio"
)

Variables

View Source
var (
	StdioData_Channel_name = map[int32]string{
		0: "INVALID",
		1: "STDOUT",
		2: "STDERR",
	}
	StdioData_Channel_value = map[string]int32{
		"INVALID": 0,
		"STDOUT":  1,
		"STDERR":  2,
	}
)

Enum value maps for StdioData_Channel.

View Source
var File_internal_plugin_grpc_broker_proto protoreflect.FileDescriptor
View Source
var File_internal_plugin_grpc_controller_proto protoreflect.FileDescriptor
View Source
var File_internal_plugin_grpc_stdio_proto protoreflect.FileDescriptor
View Source
var GRPCBroker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.GRPCBroker",
	HandlerType: (*GRPCBrokerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StartStream",
			Handler:       _GRPCBroker_StartStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "internal/plugin/grpc_broker.proto",
}

GRPCBroker_ServiceDesc is the grpc.ServiceDesc for GRPCBroker 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 GRPCController_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.GRPCController",
	HandlerType: (*GRPCControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Shutdown",
			Handler:    _GRPCController_Shutdown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/plugin/grpc_controller.proto",
}

GRPCController_ServiceDesc is the grpc.ServiceDesc for GRPCController 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 GRPCStdio_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.GRPCStdio",
	HandlerType: (*GRPCStdioServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamStdio",
			Handler:       _GRPCStdio_StreamStdio_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "internal/plugin/grpc_stdio.proto",
}

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

Functions

func RegisterGRPCBrokerServer

func RegisterGRPCBrokerServer(s grpc.ServiceRegistrar, srv GRPCBrokerServer)

func RegisterGRPCControllerServer

func RegisterGRPCControllerServer(s grpc.ServiceRegistrar, srv GRPCControllerServer)

func RegisterGRPCStdioServer

func RegisterGRPCStdioServer(s grpc.ServiceRegistrar, srv GRPCStdioServer)

Types

type ConnInfo

type ConnInfo struct {
	ServiceId uint32          `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	Network   string          `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
	Address   string          `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Knock     *ConnInfo_Knock `protobuf:"bytes,4,opt,name=knock,proto3" json:"knock,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnInfo) Descriptor deprecated

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

Deprecated: Use ConnInfo.ProtoReflect.Descriptor instead.

func (*ConnInfo) GetAddress

func (x *ConnInfo) GetAddress() string

func (*ConnInfo) GetKnock

func (x *ConnInfo) GetKnock() *ConnInfo_Knock

func (*ConnInfo) GetNetwork

func (x *ConnInfo) GetNetwork() string

func (*ConnInfo) GetServiceId

func (x *ConnInfo) GetServiceId() uint32

func (*ConnInfo) ProtoMessage

func (*ConnInfo) ProtoMessage()

func (*ConnInfo) ProtoReflect

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

func (*ConnInfo) Reset

func (x *ConnInfo) Reset()

func (*ConnInfo) String

func (x *ConnInfo) String() string

type ConnInfo_Knock

type ConnInfo_Knock struct {
	Knock bool   `protobuf:"varint,1,opt,name=knock,proto3" json:"knock,omitempty"`
	Ack   bool   `protobuf:"varint,2,opt,name=ack,proto3" json:"ack,omitempty"`
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnInfo_Knock) Descriptor deprecated

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

Deprecated: Use ConnInfo_Knock.ProtoReflect.Descriptor instead.

func (*ConnInfo_Knock) GetAck

func (x *ConnInfo_Knock) GetAck() bool

func (*ConnInfo_Knock) GetError

func (x *ConnInfo_Knock) GetError() string

func (*ConnInfo_Knock) GetKnock

func (x *ConnInfo_Knock) GetKnock() bool

func (*ConnInfo_Knock) ProtoMessage

func (*ConnInfo_Knock) ProtoMessage()

func (*ConnInfo_Knock) ProtoReflect

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

func (*ConnInfo_Knock) Reset

func (x *ConnInfo_Knock) Reset()

func (*ConnInfo_Knock) String

func (x *ConnInfo_Knock) String() string

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 GRPCBrokerClient

type GRPCBrokerClient interface {
	StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error)
}

GRPCBrokerClient is the client API for GRPCBroker 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 NewGRPCBrokerClient

func NewGRPCBrokerClient(cc grpc.ClientConnInterface) GRPCBrokerClient

type GRPCBrokerServer

type GRPCBrokerServer interface {
	StartStream(GRPCBroker_StartStreamServer) error
}

GRPCBrokerServer is the server API for GRPCBroker service. All implementations should embed UnimplementedGRPCBrokerServer for forward compatibility

type GRPCBroker_StartStreamClient

type GRPCBroker_StartStreamClient interface {
	Send(*ConnInfo) error
	Recv() (*ConnInfo, error)
	grpc.ClientStream
}

type GRPCBroker_StartStreamServer

type GRPCBroker_StartStreamServer interface {
	Send(*ConnInfo) error
	Recv() (*ConnInfo, error)
	grpc.ServerStream
}

type GRPCControllerClient

type GRPCControllerClient interface {
	Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

GRPCControllerClient is the client API for GRPCController service.

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

type GRPCControllerServer

type GRPCControllerServer interface {
	Shutdown(context.Context, *Empty) (*Empty, error)
}

GRPCControllerServer is the server API for GRPCController service. All implementations should embed UnimplementedGRPCControllerServer for forward compatibility

type GRPCStdioClient

type GRPCStdioClient interface {
	// StreamStdio returns a stream that contains all the stdout/stderr.
	// This RPC endpoint must only be called ONCE. Once stdio data is consumed
	// it is not sent again.
	//
	// Callers should connect early to prevent blocking on the plugin process.
	StreamStdio(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (GRPCStdio_StreamStdioClient, error)
}

GRPCStdioClient is the client API for GRPCStdio 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 NewGRPCStdioClient

func NewGRPCStdioClient(cc grpc.ClientConnInterface) GRPCStdioClient

type GRPCStdioServer

type GRPCStdioServer interface {
	// StreamStdio returns a stream that contains all the stdout/stderr.
	// This RPC endpoint must only be called ONCE. Once stdio data is consumed
	// it is not sent again.
	//
	// Callers should connect early to prevent blocking on the plugin process.
	StreamStdio(*emptypb.Empty, GRPCStdio_StreamStdioServer) error
}

GRPCStdioServer is the server API for GRPCStdio service. All implementations should embed UnimplementedGRPCStdioServer for forward compatibility

type GRPCStdio_StreamStdioClient

type GRPCStdio_StreamStdioClient interface {
	Recv() (*StdioData, error)
	grpc.ClientStream
}

type GRPCStdio_StreamStdioServer

type GRPCStdio_StreamStdioServer interface {
	Send(*StdioData) error
	grpc.ServerStream
}

type StdioData

type StdioData struct {
	Channel StdioData_Channel `protobuf:"varint,1,opt,name=channel,proto3,enum=plugin.StdioData_Channel" json:"channel,omitempty"`
	Data    []byte            `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

StdioData is a single chunk of stdout or stderr data that is streamed from GRPCStdio.

func (*StdioData) Descriptor deprecated

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

Deprecated: Use StdioData.ProtoReflect.Descriptor instead.

func (*StdioData) GetChannel

func (x *StdioData) GetChannel() StdioData_Channel

func (*StdioData) GetData

func (x *StdioData) GetData() []byte

func (*StdioData) ProtoMessage

func (*StdioData) ProtoMessage()

func (*StdioData) ProtoReflect

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

func (*StdioData) Reset

func (x *StdioData) Reset()

func (*StdioData) String

func (x *StdioData) String() string

type StdioData_Channel

type StdioData_Channel int32
const (
	StdioData_INVALID StdioData_Channel = 0
	StdioData_STDOUT  StdioData_Channel = 1
	StdioData_STDERR  StdioData_Channel = 2
)

func (StdioData_Channel) Descriptor

func (StdioData_Channel) Enum

func (StdioData_Channel) EnumDescriptor deprecated

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

Deprecated: Use StdioData_Channel.Descriptor instead.

func (StdioData_Channel) Number

func (StdioData_Channel) String

func (x StdioData_Channel) String() string

func (StdioData_Channel) Type

type UnimplementedGRPCBrokerServer

type UnimplementedGRPCBrokerServer struct {
}

UnimplementedGRPCBrokerServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCBrokerServer) StartStream

type UnimplementedGRPCControllerServer

type UnimplementedGRPCControllerServer struct {
}

UnimplementedGRPCControllerServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCControllerServer) Shutdown

type UnimplementedGRPCStdioServer

type UnimplementedGRPCStdioServer struct {
}

UnimplementedGRPCStdioServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCStdioServer) StreamStdio

type UnsafeGRPCBrokerServer

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

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

type UnsafeGRPCControllerServer

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

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

type UnsafeGRPCStdioServer

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

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

Jump to

Keyboard shortcuts

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