pb

package
v0.0.0-...-6415c8d Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_api_proto protoreflect.FileDescriptor
View Source
var JobController_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rund.JobController",
	HandlerType: (*JobControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Start",
			Handler:    _JobController_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _JobController_Stop_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _JobController_Status_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Log",
			Handler:       _JobController_Log_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/api.proto",
}

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

Functions

func RegisterJobControllerServer

func RegisterJobControllerServer(s grpc.ServiceRegistrar, srv JobControllerServer)

Types

type JobControllerClient

type JobControllerClient interface {
	// Start starts a job and returns an identifier that can be used to uniquely identify the started job.
	Start(ctx context.Context, in *JobStartRequest, opts ...grpc.CallOption) (*JobIdentifier, error)
	// Stop kills the running job and returns the exit code.
	Stop(ctx context.Context, in *JobIdentifier, opts ...grpc.CallOption) (*JobStatus, error)
	// Status returns the status of a job.
	Status(ctx context.Context, in *JobIdentifier, opts ...grpc.CallOption) (*JobStatus, error)
	// Log streams job logs.
	Log(ctx context.Context, in *JobIdentifier, opts ...grpc.CallOption) (JobController_LogClient, error)
}

JobControllerClient is the client API for JobController 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.

type JobControllerServer

type JobControllerServer interface {
	// Start starts a job and returns an identifier that can be used to uniquely identify the started job.
	Start(context.Context, *JobStartRequest) (*JobIdentifier, error)
	// Stop kills the running job and returns the exit code.
	Stop(context.Context, *JobIdentifier) (*JobStatus, error)
	// Status returns the status of a job.
	Status(context.Context, *JobIdentifier) (*JobStatus, error)
	// Log streams job logs.
	Log(*JobIdentifier, JobController_LogServer) error
	// contains filtered or unexported methods
}

JobControllerServer is the server API for JobController service. All implementations must embed UnimplementedJobControllerServer for forward compatibility

type JobController_LogClient

type JobController_LogClient interface {
	Recv() (*JobLog, error)
	grpc.ClientStream
}

type JobController_LogServer

type JobController_LogServer interface {
	Send(*JobLog) error
	grpc.ServerStream
}

type JobIdentifier

type JobIdentifier struct {

	// ulid uniquely identifies a process started by JobController.
	Ulid string `protobuf:"bytes,1,opt,name=ulid,proto3" json:"ulid,omitempty"`
	// contains filtered or unexported fields
}

func (*JobIdentifier) Descriptor deprecated

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

Deprecated: Use JobIdentifier.ProtoReflect.Descriptor instead.

func (*JobIdentifier) GetUlid

func (x *JobIdentifier) GetUlid() string

func (*JobIdentifier) ProtoMessage

func (*JobIdentifier) ProtoMessage()

func (*JobIdentifier) ProtoReflect

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

func (*JobIdentifier) Reset

func (x *JobIdentifier) Reset()

func (*JobIdentifier) String

func (x *JobIdentifier) String() string

type JobLog

type JobLog struct {
	Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
	// contains filtered or unexported fields
}

func (*JobLog) Descriptor deprecated

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

Deprecated: Use JobLog.ProtoReflect.Descriptor instead.

func (*JobLog) GetStderr

func (x *JobLog) GetStderr() []byte

func (*JobLog) GetStdout

func (x *JobLog) GetStdout() []byte

func (*JobLog) ProtoMessage

func (*JobLog) ProtoMessage()

func (*JobLog) ProtoReflect

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

func (*JobLog) Reset

func (x *JobLog) Reset()

func (*JobLog) String

func (x *JobLog) String() string

type JobStartRequest

type JobStartRequest struct {

	// Command name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional command arguments.
	Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	// The maximum bandwidth limit, which indicates how many time units the job may consume out of 100000.
	MaxCpuBandwidth *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_cpu_bandwidth,json=maxCpuBandwidth,proto3" json:"max_cpu_bandwidth,omitempty"`
	// Memory usage hard limit in bytes.
	MaxMemoryUsage *wrapperspb.UInt64Value `protobuf:"bytes,4,opt,name=max_memory_usage,json=maxMemoryUsage,proto3" json:"max_memory_usage,omitempty"`
	// Max read bytes per second.
	MaxRbps *wrapperspb.UInt64Value `protobuf:"bytes,5,opt,name=max_rbps,json=maxRbps,proto3" json:"max_rbps,omitempty"`
	// Max write bytes per second.
	MaxWbps *wrapperspb.UInt64Value `protobuf:"bytes,6,opt,name=max_wbps,json=maxWbps,proto3" json:"max_wbps,omitempty"`
	// Max read IO operations per second.
	MaxRiops *wrapperspb.UInt64Value `protobuf:"bytes,7,opt,name=max_riops,json=maxRiops,proto3" json:"max_riops,omitempty"`
	// Max write IO operations per second.
	MaxWiops *wrapperspb.UInt64Value `protobuf:"bytes,8,opt,name=max_wiops,json=maxWiops,proto3" json:"max_wiops,omitempty"`
	// contains filtered or unexported fields
}

func (*JobStartRequest) Descriptor deprecated

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

Deprecated: Use JobStartRequest.ProtoReflect.Descriptor instead.

func (*JobStartRequest) GetArgs

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

func (*JobStartRequest) GetMaxCpuBandwidth

func (x *JobStartRequest) GetMaxCpuBandwidth() *wrapperspb.UInt32Value

func (*JobStartRequest) GetMaxMemoryUsage

func (x *JobStartRequest) GetMaxMemoryUsage() *wrapperspb.UInt64Value

func (*JobStartRequest) GetMaxRbps

func (x *JobStartRequest) GetMaxRbps() *wrapperspb.UInt64Value

func (*JobStartRequest) GetMaxRiops

func (x *JobStartRequest) GetMaxRiops() *wrapperspb.UInt64Value

func (*JobStartRequest) GetMaxWbps

func (x *JobStartRequest) GetMaxWbps() *wrapperspb.UInt64Value

func (*JobStartRequest) GetMaxWiops

func (x *JobStartRequest) GetMaxWiops() *wrapperspb.UInt64Value

func (*JobStartRequest) GetName

func (x *JobStartRequest) GetName() string

func (*JobStartRequest) ProtoMessage

func (*JobStartRequest) ProtoMessage()

func (*JobStartRequest) ProtoReflect

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

func (*JobStartRequest) Reset

func (x *JobStartRequest) Reset()

func (*JobStartRequest) String

func (x *JobStartRequest) String() string

type JobStatus

type JobStatus struct {

	// Whether the job has been stopped via `Stop` RPC.
	Stopped bool `protobuf:"varint,1,opt,name=stopped,proto3" json:"stopped,omitempty"`
	// Whether the job has been killed.
	Killed bool `protobuf:"varint,2,opt,name=killed,proto3" json:"killed,omitempty"`
	// Exit code of the process, if not set - the process is still running.
	ExitCode *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// CPU user time with microsecond precision.
	UserTime *durationpb.Duration `protobuf:"bytes,4,opt,name=user_time,json=userTime,proto3" json:"user_time,omitempty"`
	// CPU system time with microsecond precision.
	SystemTime *durationpb.Duration `protobuf:"bytes,5,opt,name=system_time,json=systemTime,proto3" json:"system_time,omitempty"`
	// The total amount of memory currently being used by the job cgroup and its descendants in bytes.
	MemoryCurrent uint64 `protobuf:"varint,6,opt,name=memory_current,json=memoryCurrent,proto3" json:"memory_current,omitempty"`
	// contains filtered or unexported fields
}

func (*JobStatus) Descriptor deprecated

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

Deprecated: Use JobStatus.ProtoReflect.Descriptor instead.

func (*JobStatus) GetExitCode

func (x *JobStatus) GetExitCode() *wrapperspb.UInt32Value

func (*JobStatus) GetKilled

func (x *JobStatus) GetKilled() bool

func (*JobStatus) GetMemoryCurrent

func (x *JobStatus) GetMemoryCurrent() uint64

func (*JobStatus) GetStopped

func (x *JobStatus) GetStopped() bool

func (*JobStatus) GetSystemTime

func (x *JobStatus) GetSystemTime() *durationpb.Duration

func (*JobStatus) GetUserTime

func (x *JobStatus) GetUserTime() *durationpb.Duration

func (*JobStatus) ProtoMessage

func (*JobStatus) ProtoMessage()

func (*JobStatus) ProtoReflect

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

func (*JobStatus) Reset

func (x *JobStatus) Reset()

func (*JobStatus) String

func (x *JobStatus) String() string

type UnimplementedJobControllerServer

type UnimplementedJobControllerServer struct {
}

UnimplementedJobControllerServer must be embedded to have forward compatible implementations.

func (UnimplementedJobControllerServer) Log

func (UnimplementedJobControllerServer) Start

func (UnimplementedJobControllerServer) Status

func (UnimplementedJobControllerServer) Stop

type UnsafeJobControllerServer

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

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

Jump to

Keyboard shortcuts

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