bolt_observer_api

package
v0.1.7-beta3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 8 Imported by: 0

README

Actions-api

This is the GRPC client side of actions.

Usage

./gen.sh

to regenerate go code from .proto file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReplyType_name = map[int32]string{
		0: "SUCCESS",
		1: "ERROR",
	}
	ReplyType_value = map[string]int32{
		"SUCCESS": 0,
		"ERROR":   1,
	}
)

Enum value maps for ReplyType.

View Source
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.

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetAction

func (x *Action) GetAction() string

func (*Action) GetData

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

func (*Action) GetJobId

func (x *Action) GetJobId() int32

func (*Action) GetSequence

func (x *Action) GetSequence() Sequence

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

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
const (
	ReplyType_SUCCESS ReplyType = 0
	ReplyType_ERROR   ReplyType = 1
)

func (ReplyType) Descriptor

func (ReplyType) Descriptor() protoreflect.EnumDescriptor

func (ReplyType) Enum

func (x ReplyType) Enum() *ReplyType

func (ReplyType) EnumDescriptor deprecated

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

Deprecated: Use ReplyType.Descriptor instead.

func (ReplyType) Number

func (x ReplyType) Number() protoreflect.EnumNumber

func (ReplyType) String

func (x ReplyType) String() string

func (ReplyType) Type

type Sequence

type Sequence int32
const (
	Sequence_CONNECT  Sequence = 0
	Sequence_EXECUTE  Sequence = 1
	Sequence_LOG      Sequence = 2
	Sequence_FINISHED Sequence = 3
)

func (Sequence) Descriptor

func (Sequence) Descriptor() protoreflect.EnumDescriptor

func (Sequence) Enum

func (x Sequence) Enum() *Sequence

func (Sequence) EnumDescriptor deprecated

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

Deprecated: Use Sequence.Descriptor instead.

func (Sequence) Number

func (x Sequence) Number() protoreflect.EnumNumber

func (Sequence) String

func (x Sequence) String() string

func (Sequence) Type

type UnimplementedActionAPIServer

type UnimplementedActionAPIServer struct {
}

UnimplementedActionAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedActionAPIServer) Subscribe

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.

Jump to

Keyboard shortcuts

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