Documentation ¶
Index ¶
- Variables
- func RegisterLucidityServer(s grpc.ServiceRegistrar, srv LucidityServer)
- type Disable
- type ListWorkersRequest
- func (*ListWorkersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListWorkersRequest) GetHostname() string
- func (x *ListWorkersRequest) GetName() string
- func (*ListWorkersRequest) ProtoMessage()
- func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message
- func (x *ListWorkersRequest) Reset()
- func (x *ListWorkersRequest) String() string
- type ListWorkersResponse
- func (*ListWorkersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListWorkersResponse) GetWorkers() []*Worker
- func (*ListWorkersResponse) ProtoMessage()
- func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message
- func (x *ListWorkersResponse) Reset()
- func (x *ListWorkersResponse) String() string
- type LucidityClient
- type LucidityServer
- type UnimplementedLucidityServer
- type UnsafeLucidityServer
- type UpdateResponse
- type Worker
- func (*Worker) Descriptor() ([]byte, []int)deprecated
- func (x *Worker) GetAlive() bool
- func (x *Worker) GetBusy() bool
- func (x *Worker) GetCurrentTask() string
- func (x *Worker) GetDisabled() bool
- func (x *Worker) GetHealthy() bool
- func (x *Worker) GetHostname() string
- func (x *Worker) GetLastTask() string
- func (x *Worker) GetName() string
- func (x *Worker) GetStartTime() int64
- func (x *Worker) GetStatus() string
- func (x *Worker) GetTaskStartTime() int64
- func (x *Worker) GetUpdateTime() int64
- func (x *Worker) GetVersion() string
- func (*Worker) ProtoMessage()
- func (x *Worker) ProtoReflect() protoreflect.Message
- func (x *Worker) Reset()
- func (x *Worker) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_lucidity_lucidity_proto protoreflect.FileDescriptor
var Lucidity_ServiceDesc = grpc.ServiceDesc{ ServiceName: "build.please.remote.lucidity.Lucidity", HandlerType: (*LucidityServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Update", Handler: _Lucidity_Update_Handler, }, { MethodName: "ListWorkers", Handler: _Lucidity_ListWorkers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/lucidity/lucidity.proto", }
Lucidity_ServiceDesc is the grpc.ServiceDesc for Lucidity service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLucidityServer ¶
func RegisterLucidityServer(s grpc.ServiceRegistrar, srv LucidityServer)
Types ¶
type Disable ¶
type Disable struct { // Name of the worker to disable Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // If true, worker is disabled; if false, it will become enabled. Disable bool `protobuf:"varint,2,opt,name=disable,proto3" json:"disable,omitempty"` // contains filtered or unexported fields }
This is part of the HTTP API; the request to disable a worker.
func (*Disable) Descriptor
deprecated
func (*Disable) GetDisable ¶
func (*Disable) ProtoMessage ¶
func (*Disable) ProtoMessage()
func (*Disable) ProtoReflect ¶
func (x *Disable) ProtoReflect() protoreflect.Message
type ListWorkersRequest ¶
type ListWorkersRequest struct { // The worker name to return Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The hostname to return workers for Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // contains filtered or unexported fields }
func (*ListWorkersRequest) Descriptor
deprecated
func (*ListWorkersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListWorkersRequest.ProtoReflect.Descriptor instead.
func (*ListWorkersRequest) GetHostname ¶
func (x *ListWorkersRequest) GetHostname() string
func (*ListWorkersRequest) GetName ¶
func (x *ListWorkersRequest) GetName() string
func (*ListWorkersRequest) ProtoMessage ¶
func (*ListWorkersRequest) ProtoMessage()
func (*ListWorkersRequest) ProtoReflect ¶
func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message
func (*ListWorkersRequest) Reset ¶
func (x *ListWorkersRequest) Reset()
func (*ListWorkersRequest) String ¶
func (x *ListWorkersRequest) String() string
type ListWorkersResponse ¶
type ListWorkersResponse struct { // List of all the currently known workers, optionally filtered on the // request. Workers []*Worker `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` // contains filtered or unexported fields }
func (*ListWorkersResponse) Descriptor
deprecated
func (*ListWorkersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListWorkersResponse.ProtoReflect.Descriptor instead.
func (*ListWorkersResponse) GetWorkers ¶
func (x *ListWorkersResponse) GetWorkers() []*Worker
func (*ListWorkersResponse) ProtoMessage ¶
func (*ListWorkersResponse) ProtoMessage()
func (*ListWorkersResponse) ProtoReflect ¶
func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message
func (*ListWorkersResponse) Reset ¶
func (x *ListWorkersResponse) Reset()
func (*ListWorkersResponse) String ¶
func (x *ListWorkersResponse) String() string
type LucidityClient ¶
type LucidityClient interface { // Update sends the server an update on the current state of a worker. Update(ctx context.Context, in *Worker, opts ...grpc.CallOption) (*UpdateResponse, error) // List the current set of workers ListWorkers(ctx context.Context, in *ListWorkersRequest, opts ...grpc.CallOption) (*ListWorkersResponse, error) }
LucidityClient is the client API for Lucidity 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 NewLucidityClient ¶
func NewLucidityClient(cc grpc.ClientConnInterface) LucidityClient
type LucidityServer ¶
type LucidityServer interface { // Update sends the server an update on the current state of a worker. Update(context.Context, *Worker) (*UpdateResponse, error) // List the current set of workers ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error) // contains filtered or unexported methods }
LucidityServer is the server API for Lucidity service. All implementations must embed UnimplementedLucidityServer for forward compatibility
type UnimplementedLucidityServer ¶
type UnimplementedLucidityServer struct { }
UnimplementedLucidityServer must be embedded to have forward compatible implementations.
func (UnimplementedLucidityServer) ListWorkers ¶
func (UnimplementedLucidityServer) ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error)
func (UnimplementedLucidityServer) Update ¶
func (UnimplementedLucidityServer) Update(context.Context, *Worker) (*UpdateResponse, error)
type UnsafeLucidityServer ¶
type UnsafeLucidityServer interface {
// contains filtered or unexported methods
}
UnsafeLucidityServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LucidityServer will result in compilation errors.
type UpdateResponse ¶
type UpdateResponse struct { // True if the receiving server should become unavailable until it receives // another response saying it's ok to come back to life again. ShouldDisable bool `protobuf:"varint,1,opt,name=should_disable,json=shouldDisable,proto3" json:"should_disable,omitempty"` // contains filtered or unexported fields }
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetShouldDisable ¶
func (x *UpdateResponse) GetShouldDisable() bool
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
type Worker ¶
type Worker struct { // The name of this worker. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The host name of the machine the worker is on Hostname string `protobuf:"bytes,13,opt,name=hostname,proto3" json:"hostname,omitempty"` // The version this worker is currently at Version string `protobuf:"bytes,12,opt,name=version,proto3" json:"version,omitempty"` // The time the worker started at (as a Unix timestamp) StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The time the server is reporting in at (the server may overwrite this) UpdateTime int64 `protobuf:"varint,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // A human-readable string describing the current state of the server. Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // Whether the worker currently considers itself healthy. Healthy bool `protobuf:"varint,5,opt,name=healthy,proto3" json:"healthy,omitempty"` // Whether the worker was busy at the point it sent this request. Busy bool `protobuf:"varint,6,opt,name=busy,proto3" json:"busy,omitempty"` // Whether the worker is now alive or not (note that it is possible to be // alive but unhealthy) Alive bool `protobuf:"varint,7,opt,name=alive,proto3" json:"alive,omitempty"` // A URL containing the last unit of work the server performed. LastTask string `protobuf:"bytes,8,opt,name=last_task,json=lastTask,proto3" json:"last_task,omitempty"` // Server-side only; indicates whether this server has been shut down. Disabled bool `protobuf:"varint,9,opt,name=disabled,proto3" json:"disabled,omitempty"` // ID of the currently executing task, if there is one. CurrentTask string `protobuf:"bytes,10,opt,name=current_task,json=currentTask,proto3" json:"current_task,omitempty"` // The time the current task was started at. TaskStartTime int64 `protobuf:"varint,11,opt,name=task_start_time,json=taskStartTime,proto3" json:"task_start_time,omitempty"` // contains filtered or unexported fields }
func (*Worker) Descriptor
deprecated
func (*Worker) GetCurrentTask ¶
func (*Worker) GetDisabled ¶
func (*Worker) GetHealthy ¶
func (*Worker) GetHostname ¶
func (*Worker) GetLastTask ¶
func (*Worker) GetStartTime ¶
func (*Worker) GetTaskStartTime ¶
func (*Worker) GetUpdateTime ¶
func (*Worker) GetVersion ¶
func (*Worker) ProtoMessage ¶
func (*Worker) ProtoMessage()
func (*Worker) ProtoReflect ¶
func (x *Worker) ProtoReflect() protoreflect.Message