proto

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_worker_proto protoreflect.FileDescriptor
View Source
var Worker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Worker",
	HandlerType: (*WorkerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _Worker_GetInfo_Handler,
		},
		{
			MethodName: "RunContainer",
			Handler:    _Worker_RunContainer_Handler,
		},
		{
			MethodName: "CheckContainer",
			Handler:    _Worker_CheckContainer_Handler,
		},
		{
			MethodName: "StopContainer",
			Handler:    _Worker_StopContainer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/worker.proto",
}

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

Functions

func RegisterWorkerServer

func RegisterWorkerServer(s grpc.ServiceRegistrar, srv WorkerServer)

Types

type Container

type Container struct {
	Id      string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Image   string            `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	Command []string          `protobuf:"bytes,3,rep,name=command,proto3" json:"command,omitempty"`
	WorkDir string            `protobuf:"bytes,4,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"`
	Outputs []*Volume         `protobuf:"bytes,5,rep,name=outputs,proto3" json:"outputs,omitempty"`
	Inputs  []*Volume         `protobuf:"bytes,6,rep,name=inputs,proto3" json:"inputs,omitempty"`
	Env     map[string]string `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Container) Descriptor deprecated

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

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetCommand

func (x *Container) GetCommand() []string

func (*Container) GetEnv

func (x *Container) GetEnv() map[string]string

func (*Container) GetId

func (x *Container) GetId() string

func (*Container) GetImage

func (x *Container) GetImage() string

func (*Container) GetInputs

func (x *Container) GetInputs() []*Volume

func (*Container) GetOutputs

func (x *Container) GetOutputs() []*Volume

func (*Container) GetWorkDir

func (x *Container) GetWorkDir() string

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) ProtoReflect

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

func (*Container) Reset

func (x *Container) Reset()

func (*Container) String

func (x *Container) String() string

type Info

type Info struct {
	CpuCores           int32   `protobuf:"varint,1,opt,name=cpu_cores,json=cpuCores,proto3" json:"cpu_cores,omitempty"`
	RamGb              float64 `protobuf:"fixed64,2,opt,name=ram_gb,json=ramGb,proto3" json:"ram_gb,omitempty"`
	IdentifiedCpuCores int32   `protobuf:"varint,3,opt,name=identified_cpu_cores,json=identifiedCpuCores,proto3" json:"identified_cpu_cores,omitempty"`
	IdentifiedRamGb    float64 `protobuf:"fixed64,4,opt,name=identified_ram_gb,json=identifiedRamGb,proto3" json:"identified_ram_gb,omitempty"`
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetCpuCores

func (x *Info) GetCpuCores() int32

func (*Info) GetIdentifiedCpuCores

func (x *Info) GetIdentifiedCpuCores() int32

func (*Info) GetIdentifiedRamGb

func (x *Info) GetIdentifiedRamGb() float64

func (*Info) GetRamGb

func (x *Info) GetRamGb() float64

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

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

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type State

type State struct {
	Exited     bool                 `protobuf:"varint,1,opt,name=exited,proto3" json:"exited,omitempty"`
	ExitCode   int32                `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	Start      *timestamp.Timestamp `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"`
	End        *timestamp.Timestamp `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"`
	Stdout     string               `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr     string               `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"`
	CpuTime    uint64               `protobuf:"varint,7,opt,name=cpu_time,json=cpuTime,proto3" json:"cpu_time,omitempty"`
	CpuPercent float64              `protobuf:"fixed64,8,opt,name=cpu_percent,json=cpuPercent,proto3" json:"cpu_percent,omitempty"`
	Memory     uint64               `protobuf:"varint,9,opt,name=memory,proto3" json:"memory,omitempty"`
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetCpuPercent

func (x *State) GetCpuPercent() float64

func (*State) GetCpuTime

func (x *State) GetCpuTime() uint64

func (*State) GetEnd

func (x *State) GetEnd() *timestamp.Timestamp

func (*State) GetExitCode

func (x *State) GetExitCode() int32

func (*State) GetExited

func (x *State) GetExited() bool

func (*State) GetMemory

func (x *State) GetMemory() uint64

func (*State) GetStart

func (x *State) GetStart() *timestamp.Timestamp

func (*State) GetStderr

func (x *State) GetStderr() string

func (*State) GetStdout

func (x *State) GetStdout() string

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type UnimplementedWorkerServer

type UnimplementedWorkerServer struct {
}

UnimplementedWorkerServer must be embedded to have forward compatible implementations.

func (UnimplementedWorkerServer) CheckContainer

func (UnimplementedWorkerServer) GetInfo

func (UnimplementedWorkerServer) RunContainer

func (UnimplementedWorkerServer) StopContainer

type UnsafeWorkerServer

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

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

type Volume

type Volume struct {
	HostPath      string `protobuf:"bytes,1,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
	ContainerPath string `protobuf:"bytes,2,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
	// contains filtered or unexported fields
}

func (*Volume) Descriptor deprecated

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

Deprecated: Use Volume.ProtoReflect.Descriptor instead.

func (*Volume) GetContainerPath

func (x *Volume) GetContainerPath() string

func (*Volume) GetHostPath

func (x *Volume) GetHostPath() string

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) ProtoReflect

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

func (*Volume) Reset

func (x *Volume) Reset()

func (*Volume) String

func (x *Volume) String() string

type WorkerClient

type WorkerClient interface {
	GetInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Info, error)
	RunContainer(ctx context.Context, in *Container, opts ...grpc.CallOption) (*empty.Empty, error)
	CheckContainer(ctx context.Context, in *Container, opts ...grpc.CallOption) (*State, error)
	StopContainer(ctx context.Context, in *Container, opts ...grpc.CallOption) (*empty.Empty, error)
}

WorkerClient is the client API for Worker 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 NewWorkerClient

func NewWorkerClient(cc grpc.ClientConnInterface) WorkerClient

type WorkerServer

type WorkerServer interface {
	GetInfo(context.Context, *empty.Empty) (*Info, error)
	RunContainer(context.Context, *Container) (*empty.Empty, error)
	CheckContainer(context.Context, *Container) (*State, error)
	StopContainer(context.Context, *Container) (*empty.Empty, error)
	// contains filtered or unexported methods
}

WorkerServer is the server API for Worker service. All implementations must embed UnimplementedWorkerServer for forward compatibility

Jump to

Keyboard shortcuts

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