plugin

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 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 added in v1.1.0

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 added in v1.6.0

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 added in v1.6.0

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

func (*ConnInfo) Reset

func (x *ConnInfo) Reset()

func (*ConnInfo) String

func (x *ConnInfo) String() string

type ConnInfo_Knock added in v1.6.0

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 added in v1.6.0

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

Deprecated: Use ConnInfo_Knock.ProtoReflect.Descriptor instead.

func (*ConnInfo_Knock) GetAck added in v1.6.0

func (x *ConnInfo_Knock) GetAck() bool

func (*ConnInfo_Knock) GetError added in v1.6.0

func (x *ConnInfo_Knock) GetError() string

func (*ConnInfo_Knock) GetKnock added in v1.6.0

func (x *ConnInfo_Knock) GetKnock() bool

func (*ConnInfo_Knock) ProtoMessage added in v1.6.0

func (*ConnInfo_Knock) ProtoMessage()

func (*ConnInfo_Knock) ProtoReflect added in v1.6.0

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

func (*ConnInfo_Knock) Reset added in v1.6.0

func (x *ConnInfo_Knock) Reset()

func (*ConnInfo_Knock) String added in v1.6.0

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 added in v1.6.0

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 added in v1.1.0

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 added in v1.1.0

func NewGRPCStdioClient(cc grpc.ClientConnInterface) GRPCStdioClient

type GRPCStdioServer added in v1.1.0

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 added in v1.1.0

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

type GRPCStdio_StreamStdioServer added in v1.1.0

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

type StdioData added in v1.1.0

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 added in v1.1.0

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

Deprecated: Use StdioData.ProtoReflect.Descriptor instead.

func (*StdioData) GetChannel added in v1.1.0

func (x *StdioData) GetChannel() StdioData_Channel

func (*StdioData) GetData added in v1.1.0

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

func (*StdioData) ProtoMessage added in v1.1.0

func (*StdioData) ProtoMessage()

func (*StdioData) ProtoReflect added in v1.6.0

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

func (*StdioData) Reset added in v1.1.0

func (x *StdioData) Reset()

func (*StdioData) String added in v1.1.0

func (x *StdioData) String() string

type StdioData_Channel added in v1.1.0

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

func (StdioData_Channel) Descriptor added in v1.6.0

func (StdioData_Channel) Enum added in v1.6.0

func (StdioData_Channel) EnumDescriptor deprecated added in v1.1.0

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

Deprecated: Use StdioData_Channel.Descriptor instead.

func (StdioData_Channel) Number added in v1.6.0

func (StdioData_Channel) String added in v1.1.0

func (x StdioData_Channel) String() string

func (StdioData_Channel) Type added in v1.6.0

type UnimplementedGRPCBrokerServer added in v1.6.0

type UnimplementedGRPCBrokerServer struct {
}

UnimplementedGRPCBrokerServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCBrokerServer) StartStream added in v1.6.0

type UnimplementedGRPCControllerServer added in v1.6.0

type UnimplementedGRPCControllerServer struct {
}

UnimplementedGRPCControllerServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCControllerServer) Shutdown added in v1.6.0

type UnimplementedGRPCStdioServer added in v1.6.0

type UnimplementedGRPCStdioServer struct {
}

UnimplementedGRPCStdioServer should be embedded to have forward compatible implementations.

func (UnimplementedGRPCStdioServer) StreamStdio added in v1.6.0

type UnsafeGRPCBrokerServer added in v1.6.0

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 added in v1.6.0

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 added in v1.6.0

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