Documentation ¶
Index ¶
- Variables
- func RegisterWorkerServer(s grpc.ServiceRegistrar, srv WorkerServer)
- type Status
- type StreamArtifactEventsRequest
- type StreamArtifactEventsResponse
- func (*StreamArtifactEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamArtifactEventsResponse) GetArtifactID() uint64
- func (x *StreamArtifactEventsResponse) GetName() string
- func (x *StreamArtifactEventsResponse) GetStepID() uint64
- func (*StreamArtifactEventsResponse) ProtoMessage()
- func (x *StreamArtifactEventsResponse) ProtoReflect() protoreflect.Message
- func (x *StreamArtifactEventsResponse) Reset()
- func (x *StreamArtifactEventsResponse) String() string
- type StreamLogsRequest
- type StreamLogsResponse
- func (*StreamLogsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamLogsResponse) GetLogID() uint64
- func (x *StreamLogsResponse) GetMessage() string
- func (x *StreamLogsResponse) GetStepID() uint64
- func (x *StreamLogsResponse) GetTimestamp() *timestamppb.Timestamp
- func (*StreamLogsResponse) ProtoMessage()
- func (x *StreamLogsResponse) ProtoReflect() protoreflect.Message
- func (x *StreamLogsResponse) Reset()
- func (x *StreamLogsResponse) String() string
- type StreamStatusEventsRequest
- type StreamStatusEventsResponse
- func (*StreamStatusEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamStatusEventsResponse) GetEventID() uint64
- func (x *StreamStatusEventsResponse) GetStatus() Status
- func (x *StreamStatusEventsResponse) GetStepID() uint64
- func (*StreamStatusEventsResponse) ProtoMessage()
- func (x *StreamStatusEventsResponse) ProtoReflect() protoreflect.Message
- func (x *StreamStatusEventsResponse) Reset()
- func (x *StreamStatusEventsResponse) String() string
- type UnimplementedWorkerServer
- func (UnimplementedWorkerServer) StreamArtifactEvents(*StreamArtifactEventsRequest, Worker_StreamArtifactEventsServer) error
- func (UnimplementedWorkerServer) StreamLogs(*StreamLogsRequest, Worker_StreamLogsServer) error
- func (UnimplementedWorkerServer) StreamStatusEvents(*StreamStatusEventsRequest, Worker_StreamStatusEventsServer) error
- type UnsafeWorkerServer
- type WorkerClient
- type WorkerServer
- type Worker_StreamArtifactEventsClient
- type Worker_StreamArtifactEventsServer
- type Worker_StreamLogsClient
- type Worker_StreamLogsServer
- type Worker_StreamStatusEventsClient
- type Worker_StreamStatusEventsServer
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_PENDING", 2: "STATUS_SCHEDULING", 3: "STATUS_INITIALIZING", 4: "STATUS_RUNNING", 5: "STATUS_SUCCESS", 6: "STATUS_FAILED", 7: "STATUS_CANCELLED", } Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_PENDING": 1, "STATUS_SCHEDULING": 2, "STATUS_INITIALIZING": 3, "STATUS_RUNNING": 4, "STATUS_SUCCESS": 5, "STATUS_FAILED": 6, "STATUS_CANCELLED": 7, } )
Enum value maps for Status.
var File_api_workerapi_v1_worker_proto protoreflect.FileDescriptor
var Worker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wharf.worker.v1.Worker", HandlerType: (*WorkerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamLogs", Handler: _Worker_StreamLogs_Handler, ServerStreams: true, }, { StreamName: "StreamStatusEvents", Handler: _Worker_StreamStatusEvents_Handler, ServerStreams: true, }, { StreamName: "StreamArtifactEvents", Handler: _Worker_StreamArtifactEvents_Handler, ServerStreams: true, }, }, Metadata: "api/workerapi/v1/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 Status ¶
type Status int32
Status is an enum of different statuses for the build steps.
const ( // StatusUnspecified is the default value for this enum, and should be // treated as an erroneous status. StatusUnspecified Status = 0 // StatusPending means the build step is waiting to be scheduled, such as if // it's build stage hasen't started yet due to the former build stage still // running. StatusPending Status = 1 // StatusScheduling means this build step has been scheduled, such as the // Kubernetes Pod has been created, but the container has not yet started // running. E.g if the Docker image is still being pulled. StatusScheduling Status = 2 // StatusInitializing means the build step has started, but the initialization // steps are not complete yet. E.g the repository is still being transferred. StatusInitializing Status = 3 // StatusRunning means this build step is actively running. StatusRunning Status = 4 // StatusSuccess means this build step has completed successfully. StatusSuccess Status = 5 // StatusFailed means this build step has failed. E.g there was some // user error in the build definition. StatusFailed Status = 6 // StatusCancelled means this build was cancelled. StatusCancelled Status = 7 )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type StreamArtifactEventsRequest ¶
type StreamArtifactEventsRequest struct {
// contains filtered or unexported fields
}
Empty messages, but exists for potential future usages
func (*StreamArtifactEventsRequest) Descriptor
deprecated
func (*StreamArtifactEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamArtifactEventsRequest.ProtoReflect.Descriptor instead.
func (*StreamArtifactEventsRequest) ProtoMessage ¶
func (*StreamArtifactEventsRequest) ProtoMessage()
func (*StreamArtifactEventsRequest) ProtoReflect ¶
func (x *StreamArtifactEventsRequest) ProtoReflect() protoreflect.Message
func (*StreamArtifactEventsRequest) Reset ¶
func (x *StreamArtifactEventsRequest) Reset()
func (*StreamArtifactEventsRequest) String ¶
func (x *StreamArtifactEventsRequest) String() string
type StreamArtifactEventsResponse ¶
type StreamArtifactEventsResponse struct { // ArtifactID is the worker's own ID of the artifact. It's unique per build // step for a given build, but may have collisions across multiple steps or // builds. ArtifactID uint64 `protobuf:"varint,1,opt,name=artifact_id,json=artifactId,proto3" json:"artifact_id,omitempty"` // StepID is the worker's own ID of the build step that produced the // artifact. StepID uint64 `protobuf:"varint,2,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` // Name is the name of the artifact. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
StreamArtifactEventsResponse is a single build artifact event.
func (*StreamArtifactEventsResponse) Descriptor
deprecated
func (*StreamArtifactEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamArtifactEventsResponse.ProtoReflect.Descriptor instead.
func (*StreamArtifactEventsResponse) GetArtifactID ¶
func (x *StreamArtifactEventsResponse) GetArtifactID() uint64
func (*StreamArtifactEventsResponse) GetName ¶
func (x *StreamArtifactEventsResponse) GetName() string
func (*StreamArtifactEventsResponse) GetStepID ¶
func (x *StreamArtifactEventsResponse) GetStepID() uint64
func (*StreamArtifactEventsResponse) ProtoMessage ¶
func (*StreamArtifactEventsResponse) ProtoMessage()
func (*StreamArtifactEventsResponse) ProtoReflect ¶
func (x *StreamArtifactEventsResponse) ProtoReflect() protoreflect.Message
func (*StreamArtifactEventsResponse) Reset ¶
func (x *StreamArtifactEventsResponse) Reset()
func (*StreamArtifactEventsResponse) String ¶
func (x *StreamArtifactEventsResponse) String() string
type StreamLogsRequest ¶
type StreamLogsRequest struct {
// contains filtered or unexported fields
}
Empty messages, but exists for potential future usages
func (*StreamLogsRequest) Descriptor
deprecated
func (*StreamLogsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamLogsRequest.ProtoReflect.Descriptor instead.
func (*StreamLogsRequest) ProtoMessage ¶
func (*StreamLogsRequest) ProtoMessage()
func (*StreamLogsRequest) ProtoReflect ¶
func (x *StreamLogsRequest) ProtoReflect() protoreflect.Message
func (*StreamLogsRequest) Reset ¶
func (x *StreamLogsRequest) Reset()
func (*StreamLogsRequest) String ¶
func (x *StreamLogsRequest) String() string
type StreamLogsResponse ¶
type StreamLogsResponse struct { // LogID is the worker's own ID of the log line. It's unique per build step // for a given build, but may have collisions across multiple steps or builds. // Not database value, but instead worker's own ID of the log line. LogID uint64 `protobuf:"varint,1,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"` // StepID is the worker's own ID of the step. It's unique for a given build, // but may have collisions across multiple builds. // Not database value, but instead worker's own ID of the step ID. StepID uint64 `protobuf:"varint,2,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` // Timestamp is when the log line was outputted from the build step. Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Message is the log line text. Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
StreamLogsResponse is a single log-line from a build step.
func (*StreamLogsResponse) Descriptor
deprecated
func (*StreamLogsResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamLogsResponse.ProtoReflect.Descriptor instead.
func (*StreamLogsResponse) GetLogID ¶
func (x *StreamLogsResponse) GetLogID() uint64
func (*StreamLogsResponse) GetMessage ¶
func (x *StreamLogsResponse) GetMessage() string
func (*StreamLogsResponse) GetStepID ¶
func (x *StreamLogsResponse) GetStepID() uint64
func (*StreamLogsResponse) GetTimestamp ¶
func (x *StreamLogsResponse) GetTimestamp() *timestamppb.Timestamp
func (*StreamLogsResponse) ProtoMessage ¶
func (*StreamLogsResponse) ProtoMessage()
func (*StreamLogsResponse) ProtoReflect ¶
func (x *StreamLogsResponse) ProtoReflect() protoreflect.Message
func (*StreamLogsResponse) Reset ¶
func (x *StreamLogsResponse) Reset()
func (*StreamLogsResponse) String ¶
func (x *StreamLogsResponse) String() string
type StreamStatusEventsRequest ¶
type StreamStatusEventsRequest struct {
// contains filtered or unexported fields
}
Empty messages, but exists for potential future usages
func (*StreamStatusEventsRequest) Descriptor
deprecated
func (*StreamStatusEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamStatusEventsRequest.ProtoReflect.Descriptor instead.
func (*StreamStatusEventsRequest) ProtoMessage ¶
func (*StreamStatusEventsRequest) ProtoMessage()
func (*StreamStatusEventsRequest) ProtoReflect ¶
func (x *StreamStatusEventsRequest) ProtoReflect() protoreflect.Message
func (*StreamStatusEventsRequest) Reset ¶
func (x *StreamStatusEventsRequest) Reset()
func (*StreamStatusEventsRequest) String ¶
func (x *StreamStatusEventsRequest) String() string
type StreamStatusEventsResponse ¶
type StreamStatusEventsResponse struct { // EventID is the worker's own ID of the event the status. EventID uint64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` // StepID is the worker's own ID of the step. StepID uint64 `protobuf:"varint,2,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` // Status is the step's status. Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=wharf.worker.v1.Status" json:"status,omitempty"` // contains filtered or unexported fields }
StreamStatusEventsResponse is a single build step status update.
func (*StreamStatusEventsResponse) Descriptor
deprecated
func (*StreamStatusEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamStatusEventsResponse.ProtoReflect.Descriptor instead.
func (*StreamStatusEventsResponse) GetEventID ¶
func (x *StreamStatusEventsResponse) GetEventID() uint64
func (*StreamStatusEventsResponse) GetStatus ¶
func (x *StreamStatusEventsResponse) GetStatus() Status
func (*StreamStatusEventsResponse) GetStepID ¶
func (x *StreamStatusEventsResponse) GetStepID() uint64
func (*StreamStatusEventsResponse) ProtoMessage ¶
func (*StreamStatusEventsResponse) ProtoMessage()
func (*StreamStatusEventsResponse) ProtoReflect ¶
func (x *StreamStatusEventsResponse) ProtoReflect() protoreflect.Message
func (*StreamStatusEventsResponse) Reset ¶
func (x *StreamStatusEventsResponse) Reset()
func (*StreamStatusEventsResponse) String ¶
func (x *StreamStatusEventsResponse) String() string
type UnimplementedWorkerServer ¶
type UnimplementedWorkerServer struct { }
UnimplementedWorkerServer must be embedded to have forward compatible implementations.
func (UnimplementedWorkerServer) StreamArtifactEvents ¶
func (UnimplementedWorkerServer) StreamArtifactEvents(*StreamArtifactEventsRequest, Worker_StreamArtifactEventsServer) error
func (UnimplementedWorkerServer) StreamLogs ¶
func (UnimplementedWorkerServer) StreamLogs(*StreamLogsRequest, Worker_StreamLogsServer) error
func (UnimplementedWorkerServer) StreamStatusEvents ¶
func (UnimplementedWorkerServer) StreamStatusEvents(*StreamStatusEventsRequest, Worker_StreamStatusEventsServer) error
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 WorkerClient ¶
type WorkerClient interface { // StreamLogs opens a stream of all logs from the wharf-cmd-worker. The // responses may be mixed between multiple build steps. StreamLogs(ctx context.Context, in *StreamLogsRequest, opts ...grpc.CallOption) (Worker_StreamLogsClient, error) // StreamStatusEvents opens a stream of all build status events. Every time // a build step's status is changed, a new event is sent. StreamStatusEvents(ctx context.Context, in *StreamStatusEventsRequest, opts ...grpc.CallOption) (Worker_StreamStatusEventsClient, error) // StreamArtifactEvents opens a stream of all build artifact events. The // actual artifact BLOB data cannot be accessed via this service, but must // instead be downloaded via the HTTP REST API. This RPC should only be used // to get a notification when a new artifact is available to download. StreamArtifactEvents(ctx context.Context, in *StreamArtifactEventsRequest, opts ...grpc.CallOption) (Worker_StreamArtifactEventsClient, 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 { // StreamLogs opens a stream of all logs from the wharf-cmd-worker. The // responses may be mixed between multiple build steps. StreamLogs(*StreamLogsRequest, Worker_StreamLogsServer) error // StreamStatusEvents opens a stream of all build status events. Every time // a build step's status is changed, a new event is sent. StreamStatusEvents(*StreamStatusEventsRequest, Worker_StreamStatusEventsServer) error // StreamArtifactEvents opens a stream of all build artifact events. The // actual artifact BLOB data cannot be accessed via this service, but must // instead be downloaded via the HTTP REST API. This RPC should only be used // to get a notification when a new artifact is available to download. StreamArtifactEvents(*StreamArtifactEventsRequest, Worker_StreamArtifactEventsServer) error // contains filtered or unexported methods }
WorkerServer is the server API for Worker service. All implementations must embed UnimplementedWorkerServer for forward compatibility
type Worker_StreamArtifactEventsClient ¶
type Worker_StreamArtifactEventsClient interface { Recv() (*StreamArtifactEventsResponse, error) grpc.ClientStream }
type Worker_StreamArtifactEventsServer ¶
type Worker_StreamArtifactEventsServer interface { Send(*StreamArtifactEventsResponse) error grpc.ServerStream }
type Worker_StreamLogsClient ¶
type Worker_StreamLogsClient interface { Recv() (*StreamLogsResponse, error) grpc.ClientStream }
type Worker_StreamLogsServer ¶
type Worker_StreamLogsServer interface { Send(*StreamLogsResponse) error grpc.ServerStream }
type Worker_StreamStatusEventsClient ¶
type Worker_StreamStatusEventsClient interface { Recv() (*StreamStatusEventsResponse, error) grpc.ClientStream }
type Worker_StreamStatusEventsServer ¶
type Worker_StreamStatusEventsServer interface { Send(*StreamStatusEventsResponse) error grpc.ServerStream }