Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTransistorServiceServer(s grpc.ServiceRegistrar, srv TransistorServiceServer)
- type Change
- type CommandRequest
- type CommandResponse
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetData() *anypb.Any
- func (x *Message) GetMethod() Method
- func (x *Message) GetMode() Mode
- func (x *Message) GetTimestamp() *timestamppb.Timestamp
- func (x *Message) GetTopic() *Topic
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Method
- type Mode
- type Operation
- type PublishRequest
- type PublishResponse
- type SubscribeRequest
- type SubscribeResponse
- type Topic
- type TransistorServiceClient
- type TransistorServiceServer
- type TransistorService_CommandClient
- type TransistorService_CommandServer
- type TransistorService_PublishClient
- type TransistorService_PublishServer
- type TransistorService_SubscribeClient
- type TransistorService_SubscribeServer
- type UnimplementedTransistorServiceServer
- type UnsafeTransistorServiceServer
Constants ¶
const ( TransistorService_Command_FullMethodName = "/transistor.v1.TransistorService/Command" TransistorService_Publish_FullMethodName = "/transistor.v1.TransistorService/Publish" TransistorService_Subscribe_FullMethodName = "/transistor.v1.TransistorService/Subscribe" )
Variables ¶
var ( Method_name = map[int32]string{ 0: "METHOD_UNSPECIFIED", 1: "METHOD_EMPTY", 2: "METHOD_CREATE", 3: "METHOD_UPDATE", 4: "METHOD_DELETE", } Method_value = map[string]int32{ "METHOD_UNSPECIFIED": 0, "METHOD_EMPTY": 1, "METHOD_CREATE": 2, "METHOD_UPDATE": 3, "METHOD_DELETE": 4, } )
Enum value maps for Method.
var ( Mode_name = map[int32]string{ 0: "MODE_UNSPECIFIED", 1: "MODE_ANY", 2: "MODE_ROUTE", 3: "MODE_ROOT", } Mode_value = map[string]int32{ "MODE_UNSPECIFIED": 0, "MODE_ANY": 1, "MODE_ROUTE": 2, "MODE_ROOT": 3, } )
Enum value maps for Mode.
var ( Operation_name = map[int32]string{ 0: "OPERATION_UNSPECIFIED", 1: "OPERATION_ADD", 2: "OPERATION_DEL", } Operation_value = map[string]int32{ "OPERATION_UNSPECIFIED": 0, "OPERATION_ADD": 1, "OPERATION_DEL": 2, } )
Enum value maps for Operation.
var File_transistor_v1_transistor_proto protoreflect.FileDescriptor
var TransistorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transistor.v1.TransistorService", HandlerType: (*TransistorServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Command", Handler: _TransistorService_Command_Handler, ServerStreams: true, }, { StreamName: "Publish", Handler: _TransistorService_Publish_Handler, ClientStreams: true, }, { StreamName: "Subscribe", Handler: _TransistorService_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "transistor/v1/transistor.proto", }
TransistorService_ServiceDesc is the grpc.ServiceDesc for TransistorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTransistorServiceServer ¶
func RegisterTransistorServiceServer(s grpc.ServiceRegistrar, srv TransistorServiceServer)
Types ¶
type Change ¶
type Change struct { Mode Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=transistor.v1.Mode" json:"mode,omitempty"` Op Operation `protobuf:"varint,2,opt,name=op,proto3,enum=transistor.v1.Operation" json:"op,omitempty"` Topic *Topic `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` // contains filtered or unexported fields }
func (*Change) Descriptor
deprecated
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) ProtoReflect ¶
func (x *Change) ProtoReflect() protoreflect.Message
type CommandRequest ¶
type CommandRequest struct { Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*CommandRequest) Descriptor
deprecated
func (*CommandRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead.
func (*CommandRequest) GetArgs ¶
func (x *CommandRequest) GetArgs() []string
func (*CommandRequest) ProtoMessage ¶
func (*CommandRequest) ProtoMessage()
func (*CommandRequest) ProtoReflect ¶
func (x *CommandRequest) ProtoReflect() protoreflect.Message
func (*CommandRequest) Reset ¶
func (x *CommandRequest) Reset()
func (*CommandRequest) String ¶
func (x *CommandRequest) String() string
type CommandResponse ¶
type CommandResponse struct { Line string `protobuf:"bytes,1,opt,name=line,proto3" json:"line,omitempty"` // contains filtered or unexported fields }
func (*CommandResponse) Descriptor
deprecated
func (*CommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.
func (*CommandResponse) GetLine ¶
func (x *CommandResponse) GetLine() string
func (*CommandResponse) ProtoMessage ¶
func (*CommandResponse) ProtoMessage()
func (*CommandResponse) ProtoReflect ¶
func (x *CommandResponse) ProtoReflect() protoreflect.Message
func (*CommandResponse) Reset ¶
func (x *CommandResponse) Reset()
func (*CommandResponse) String ¶
func (x *CommandResponse) String() string
type Message ¶
type Message struct { Mode Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=transistor.v1.Mode" json:"mode,omitempty"` Topic *Topic `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` Method Method `protobuf:"varint,3,opt,name=method,proto3,enum=transistor.v1.Method" json:"method,omitempty"` Data *anypb.Any `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetTimestamp ¶
func (x *Message) GetTimestamp() *timestamppb.Timestamp
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Method ¶
type Method int32
func (Method) Descriptor ¶
func (Method) Descriptor() protoreflect.EnumDescriptor
func (Method) EnumDescriptor
deprecated
func (Method) Number ¶
func (x Method) Number() protoreflect.EnumNumber
func (Method) Type ¶
func (Method) Type() protoreflect.EnumType
type Mode ¶
type Mode int32
func (Mode) Descriptor ¶
func (Mode) Descriptor() protoreflect.EnumDescriptor
func (Mode) EnumDescriptor
deprecated
func (Mode) Number ¶
func (x Mode) Number() protoreflect.EnumNumber
func (Mode) Type ¶
func (Mode) Type() protoreflect.EnumType
type Operation ¶
type Operation int32
func (Operation) Descriptor ¶
func (Operation) Descriptor() protoreflect.EnumDescriptor
func (Operation) EnumDescriptor
deprecated
func (Operation) Number ¶
func (x Operation) Number() protoreflect.EnumNumber
func (Operation) Type ¶
func (Operation) Type() protoreflect.EnumType
type PublishRequest ¶
type PublishRequest struct { Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetMsg ¶
func (x *PublishRequest) GetMsg() *Message
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type PublishResponse ¶
type PublishResponse struct { Change []*Change `protobuf:"bytes,1,rep,name=change,proto3" json:"change,omitempty"` // contains filtered or unexported fields }
func (*PublishResponse) Descriptor
deprecated
func (*PublishResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) GetChange ¶
func (x *PublishResponse) GetChange() []*Change
func (*PublishResponse) ProtoMessage ¶
func (*PublishResponse) ProtoMessage()
func (*PublishResponse) ProtoReflect ¶
func (x *PublishResponse) ProtoReflect() protoreflect.Message
func (*PublishResponse) Reset ¶
func (x *PublishResponse) Reset()
func (*PublishResponse) String ¶
func (x *PublishResponse) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { Change *Change `protobuf:"bytes,1,opt,name=change,proto3" json:"change,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetChange ¶
func (x *SubscribeRequest) GetChange() *Change
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetMsg ¶
func (x *SubscribeResponse) GetMsg() *Message
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type Topic ¶
type Topic struct { Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` // contains filtered or unexported fields }
func (*Topic) Descriptor
deprecated
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) ProtoReflect ¶
func (x *Topic) ProtoReflect() protoreflect.Message
type TransistorServiceClient ¶
type TransistorServiceClient interface { // Open a new command line interface Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (TransistorService_CommandClient, error) // Receive a stream from a non-cluster node Publish(ctx context.Context, opts ...grpc.CallOption) (TransistorService_PublishClient, error) // Receive a stream from both cluster/non-cluster nodes // Always the subscriber should approach to this server Subscribe(ctx context.Context, opts ...grpc.CallOption) (TransistorService_SubscribeClient, error) }
TransistorServiceClient is the client API for TransistorService 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 NewTransistorServiceClient ¶
func NewTransistorServiceClient(cc grpc.ClientConnInterface) TransistorServiceClient
type TransistorServiceServer ¶
type TransistorServiceServer interface { // Open a new command line interface Command(*CommandRequest, TransistorService_CommandServer) error // Receive a stream from a non-cluster node Publish(TransistorService_PublishServer) error // Receive a stream from both cluster/non-cluster nodes // Always the subscriber should approach to this server Subscribe(TransistorService_SubscribeServer) error // contains filtered or unexported methods }
TransistorServiceServer is the server API for TransistorService service. All implementations must embed UnimplementedTransistorServiceServer for forward compatibility
type TransistorService_CommandClient ¶
type TransistorService_CommandClient interface { Recv() (*CommandResponse, error) grpc.ClientStream }
type TransistorService_CommandServer ¶
type TransistorService_CommandServer interface { Send(*CommandResponse) error grpc.ServerStream }
type TransistorService_PublishClient ¶
type TransistorService_PublishClient interface { Send(*PublishRequest) error CloseAndRecv() (*PublishResponse, error) grpc.ClientStream }
type TransistorService_PublishServer ¶
type TransistorService_PublishServer interface { SendAndClose(*PublishResponse) error Recv() (*PublishRequest, error) grpc.ServerStream }
type TransistorService_SubscribeClient ¶
type TransistorService_SubscribeClient interface { Send(*SubscribeRequest) error Recv() (*SubscribeResponse, error) grpc.ClientStream }
type TransistorService_SubscribeServer ¶
type TransistorService_SubscribeServer interface { Send(*SubscribeResponse) error Recv() (*SubscribeRequest, error) grpc.ServerStream }
type UnimplementedTransistorServiceServer ¶
type UnimplementedTransistorServiceServer struct { }
UnimplementedTransistorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTransistorServiceServer) Publish ¶
func (UnimplementedTransistorServiceServer) Publish(TransistorService_PublishServer) error
func (UnimplementedTransistorServiceServer) Subscribe ¶
func (UnimplementedTransistorServiceServer) Subscribe(TransistorService_SubscribeServer) error
type UnsafeTransistorServiceServer ¶
type UnsafeTransistorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTransistorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransistorServiceServer will result in compilation errors.