Documentation
¶
Index ¶
- Variables
- func RegisterActionAPIServer(s grpc.ServiceRegistrar, srv ActionAPIServer)
- type Action
- func (*Action) Descriptor() ([]byte, []int)deprecated
- func (x *Action) GetAction() string
- func (x *Action) GetData() []byte
- func (x *Action) GetJobId() int32
- func (x *Action) GetSequence() Sequence
- func (*Action) ProtoMessage()
- func (x *Action) ProtoReflect() protoreflect.Message
- func (x *Action) Reset()
- func (x *Action) String() string
- type ActionAPIClient
- type ActionAPIServer
- type ActionAPI_SubscribeClient
- type ActionAPI_SubscribeServer
- type AgentReply
- func (*AgentReply) Descriptor() ([]byte, []int)deprecated
- func (x *AgentReply) GetData() []byte
- func (x *AgentReply) GetJobId() int32
- func (x *AgentReply) GetMessage() string
- func (x *AgentReply) GetSequence() Sequence
- func (x *AgentReply) GetType() ReplyType
- func (*AgentReply) ProtoMessage()
- func (x *AgentReply) ProtoReflect() protoreflect.Message
- func (x *AgentReply) Reset()
- func (x *AgentReply) String() string
- type ReplyType
- type Sequence
- type UnimplementedActionAPIServer
- type UnsafeActionAPIServer
Constants ¶
This section is empty.
Variables ¶
var ( ReplyType_name = map[int32]string{ 0: "SUCCESS", 1: "ERROR", } ReplyType_value = map[string]int32{ "SUCCESS": 0, "ERROR": 1, } )
Enum value maps for ReplyType.
var ( Sequence_name = map[int32]string{ 0: "CONNECT", 1: "EXECUTE", 2: "LOG", 3: "FINISHED", } Sequence_value = map[string]int32{ "CONNECT": 0, "EXECUTE": 1, "LOG": 2, "FINISHED": 3, } )
Enum value maps for Sequence.
var ActionAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.ActionAPI", HandlerType: (*ActionAPIServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _ActionAPI_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "actions-api.proto", }
ActionAPI_ServiceDesc is the grpc.ServiceDesc for ActionAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_actions_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterActionAPIServer ¶
func RegisterActionAPIServer(s grpc.ServiceRegistrar, srv ActionAPIServer)
Types ¶
type Action ¶
type Action struct { JobId int32 `protobuf:"varint,1,opt,name=jobId,proto3" json:"jobId,omitempty"` Sequence Sequence `protobuf:"varint,2,opt,name=sequence,proto3,enum=agent.Sequence" json:"sequence,omitempty"` Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Action) Descriptor
deprecated
func (*Action) GetSequence ¶
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
type ActionAPIClient ¶
type ActionAPIClient interface {
Subscribe(ctx context.Context, opts ...grpc.CallOption) (ActionAPI_SubscribeClient, error)
}
ActionAPIClient is the client API for ActionAPI 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 NewActionAPIClient ¶
func NewActionAPIClient(cc grpc.ClientConnInterface) ActionAPIClient
type ActionAPIServer ¶
type ActionAPIServer interface { Subscribe(ActionAPI_SubscribeServer) error // contains filtered or unexported methods }
ActionAPIServer is the server API for ActionAPI service. All implementations must embed UnimplementedActionAPIServer for forward compatibility
type ActionAPI_SubscribeClient ¶
type ActionAPI_SubscribeClient interface { Send(*AgentReply) error Recv() (*Action, error) grpc.ClientStream }
type ActionAPI_SubscribeServer ¶
type ActionAPI_SubscribeServer interface { Send(*Action) error Recv() (*AgentReply, error) grpc.ServerStream }
type AgentReply ¶
type AgentReply struct { JobId int32 `protobuf:"varint,1,opt,name=jobId,proto3" json:"jobId,omitempty"` Sequence Sequence `protobuf:"varint,2,opt,name=sequence,proto3,enum=agent.Sequence" json:"sequence,omitempty"` Type ReplyType `protobuf:"varint,3,opt,name=type,proto3,enum=agent.ReplyType" json:"type,omitempty"` Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*AgentReply) Descriptor
deprecated
func (*AgentReply) Descriptor() ([]byte, []int)
Deprecated: Use AgentReply.ProtoReflect.Descriptor instead.
func (*AgentReply) GetData ¶
func (x *AgentReply) GetData() []byte
func (*AgentReply) GetJobId ¶
func (x *AgentReply) GetJobId() int32
func (*AgentReply) GetMessage ¶
func (x *AgentReply) GetMessage() string
func (*AgentReply) GetSequence ¶
func (x *AgentReply) GetSequence() Sequence
func (*AgentReply) GetType ¶
func (x *AgentReply) GetType() ReplyType
func (*AgentReply) ProtoMessage ¶
func (*AgentReply) ProtoMessage()
func (*AgentReply) ProtoReflect ¶
func (x *AgentReply) ProtoReflect() protoreflect.Message
func (*AgentReply) Reset ¶
func (x *AgentReply) Reset()
func (*AgentReply) String ¶
func (x *AgentReply) String() string
type ReplyType ¶
type ReplyType int32
func (ReplyType) Descriptor ¶
func (ReplyType) Descriptor() protoreflect.EnumDescriptor
func (ReplyType) EnumDescriptor
deprecated
func (ReplyType) Number ¶
func (x ReplyType) Number() protoreflect.EnumNumber
func (ReplyType) Type ¶
func (ReplyType) Type() protoreflect.EnumType
type Sequence ¶
type Sequence int32
func (Sequence) Descriptor ¶
func (Sequence) Descriptor() protoreflect.EnumDescriptor
func (Sequence) EnumDescriptor
deprecated
func (Sequence) Number ¶
func (x Sequence) Number() protoreflect.EnumNumber
func (Sequence) Type ¶
func (Sequence) Type() protoreflect.EnumType
type UnimplementedActionAPIServer ¶
type UnimplementedActionAPIServer struct { }
UnimplementedActionAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedActionAPIServer) Subscribe ¶
func (UnimplementedActionAPIServer) Subscribe(ActionAPI_SubscribeServer) error
type UnsafeActionAPIServer ¶
type UnsafeActionAPIServer interface {
// contains filtered or unexported methods
}
UnsafeActionAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionAPIServer will result in compilation errors.