proto

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_task_proto protoreflect.FileDescriptor
View Source
var Task_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Task",
	HandlerType: (*TaskServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Stop",
			Handler:    _Task_Stop_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Exec",
			Handler:       _Task_Exec_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/task.proto",
}

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

Functions

func RegisterTaskServer

func RegisterTaskServer(s grpc.ServiceRegistrar, srv TaskServer)

Types

type ExecRequest

type ExecRequest struct {
	Id      string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name    *string  `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Command string   `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
	Args    []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecRequest) Descriptor deprecated

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

Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead.

func (*ExecRequest) GetArgs

func (x *ExecRequest) GetArgs() []string

func (*ExecRequest) GetCommand

func (x *ExecRequest) GetCommand() string

func (*ExecRequest) GetId

func (x *ExecRequest) GetId() string

func (*ExecRequest) GetName

func (x *ExecRequest) GetName() string

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) ProtoReflect

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

func (*ExecRequest) Reset

func (x *ExecRequest) Reset()

func (*ExecRequest) String

func (x *ExecRequest) String() string

type ExecResponse

type ExecResponse struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecResponse) Descriptor deprecated

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

Deprecated: Use ExecResponse.ProtoReflect.Descriptor instead.

func (*ExecResponse) GetContent

func (x *ExecResponse) GetContent() []byte

func (*ExecResponse) ProtoMessage

func (*ExecResponse) ProtoMessage()

func (*ExecResponse) ProtoReflect

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

func (*ExecResponse) Reset

func (x *ExecResponse) Reset()

func (*ExecResponse) String

func (x *ExecResponse) String() string

type StopRequest

type StopRequest struct {
	Id   string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetId

func (x *StopRequest) GetId() string

func (*StopRequest) GetName

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

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

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

type StopResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) GetMessage

func (x *StopResponse) GetMessage() string

func (*StopResponse) GetSuccess

func (x *StopResponse) GetSuccess() bool

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

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

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type TaskClient

type TaskClient interface {
	// Exec task stream
	Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (Task_ExecClient, error)
	// Stop task stop, optional
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
}

TaskClient is the client API for Task 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 NewTaskClient

func NewTaskClient(cc grpc.ClientConnInterface) TaskClient

type TaskServer

type TaskServer interface {
	// Exec task stream
	Exec(*ExecRequest, Task_ExecServer) error
	// Stop task stop, optional
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// contains filtered or unexported methods
}

TaskServer is the server API for Task service. All implementations must embed UnimplementedTaskServer for forward compatibility

type Task_ExecClient

type Task_ExecClient interface {
	Recv() (*ExecResponse, error)
	grpc.ClientStream
}

type Task_ExecServer

type Task_ExecServer interface {
	Send(*ExecResponse) error
	grpc.ServerStream
}

type UnimplementedTaskServer

type UnimplementedTaskServer struct {
}

UnimplementedTaskServer must be embedded to have forward compatible implementations.

func (UnimplementedTaskServer) Exec

func (UnimplementedTaskServer) Stop

type UnsafeTaskServer

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

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

Jump to

Keyboard shortcuts

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