Documentation
¶
Index ¶
- Variables
- func RegisterBuildsServer(s grpc.ServiceRegistrar, srv BuildsServer)
- type BuildsClient
- type BuildsServer
- type Builds_CreateLogStreamClient
- type Builds_CreateLogStreamServer
- type CreateLogStreamRequest
- func (*CreateLogStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateLogStreamRequest) GetBuildID() uint64
- func (x *CreateLogStreamRequest) GetMessage() string
- func (x *CreateLogStreamRequest) GetTimestamp() *timestamppb.Timestamp
- func (x *CreateLogStreamRequest) GetWorkerLogID() uint64
- func (x *CreateLogStreamRequest) GetWorkerStepID() uint64
- func (*CreateLogStreamRequest) ProtoMessage()
- func (x *CreateLogStreamRequest) ProtoReflect() protoreflect.Message
- func (x *CreateLogStreamRequest) Reset()
- func (x *CreateLogStreamRequest) String() string
- type CreateLogStreamResponse
- func (*CreateLogStreamResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateLogStreamResponse) GetLinesInserted() uint64
- func (*CreateLogStreamResponse) ProtoMessage()
- func (x *CreateLogStreamResponse) ProtoReflect() protoreflect.Message
- func (x *CreateLogStreamResponse) Reset()
- func (x *CreateLogStreamResponse) String() string
- type UnimplementedBuildsServer
- type UnsafeBuildsServer
Constants ¶
This section is empty.
Variables ¶
var Builds_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wharf.api.v5.Builds", HandlerType: (*BuildsServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "CreateLogStream", Handler: _Builds_CreateLogStream_Handler, ClientStreams: true, }, }, Metadata: "api/wharfapi/v5/builds.proto", }
Builds_ServiceDesc is the grpc.ServiceDesc for Builds service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_wharfapi_v5_builds_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBuildsServer ¶
func RegisterBuildsServer(s grpc.ServiceRegistrar, srv BuildsServer)
Types ¶
type BuildsClient ¶
type BuildsClient interface {
// CreateLogStream allows creating logs as a client-side stream.
// Logs targeting non-existing builds as well as logs that has already been
// added before (based on the build, log, and step IDs) will be discarded.
CreateLogStream(ctx context.Context, opts ...grpc.CallOption) (Builds_CreateLogStreamClient, error)
}
BuildsClient is the client API for Builds 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 NewBuildsClient ¶
func NewBuildsClient(cc grpc.ClientConnInterface) BuildsClient
type BuildsServer ¶
type BuildsServer interface {
// CreateLogStream allows creating logs as a client-side stream.
// Logs targeting non-existing builds as well as logs that has already been
// added before (based on the build, log, and step IDs) will be discarded.
CreateLogStream(Builds_CreateLogStreamServer) error
// contains filtered or unexported methods
}
BuildsServer is the server API for Builds service. All implementations must embed UnimplementedBuildsServer for forward compatibility
type Builds_CreateLogStreamClient ¶
type Builds_CreateLogStreamClient interface {
Send(*CreateLogStreamRequest) error
CloseAndRecv() (*CreateLogStreamResponse, error)
grpc.ClientStream
}
type Builds_CreateLogStreamServer ¶
type Builds_CreateLogStreamServer interface {
SendAndClose(*CreateLogStreamResponse) error
Recv() (*CreateLogStreamRequest, error)
grpc.ServerStream
}
type CreateLogStreamRequest ¶
type CreateLogStreamRequest struct {
// BuildID is the database ID of the build this log line belongs to.
BuildID uint64 `protobuf:"varint,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
// WorkerLogID is the worker's own ID of the log line. It's unique per build
// step for a given build, but may have collisons across multiple steps or
// builds. Not database value, but instead worker's own ID of the log line.
WorkerLogID uint64 `protobuf:"varint,2,opt,name=worker_log_id,json=workerLogId,proto3" json:"worker_log_id,omitempty"`
// WorkerStepID 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.
WorkerStepID uint64 `protobuf:"varint,3,opt,name=worker_step_id,json=workerStepId,proto3" json:"worker_step_id,omitempty"`
// Timestamp is when the log line was outputted from the build step.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Message is the log line text.
Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
CreateLogStreamRequest contains the streamed log lines that meant to be created.
func (*CreateLogStreamRequest) Descriptor
deprecated
func (*CreateLogStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateLogStreamRequest.ProtoReflect.Descriptor instead.
func (*CreateLogStreamRequest) GetBuildID ¶
func (x *CreateLogStreamRequest) GetBuildID() uint64
func (*CreateLogStreamRequest) GetMessage ¶
func (x *CreateLogStreamRequest) GetMessage() string
func (*CreateLogStreamRequest) GetTimestamp ¶
func (x *CreateLogStreamRequest) GetTimestamp() *timestamppb.Timestamp
func (*CreateLogStreamRequest) GetWorkerLogID ¶
func (x *CreateLogStreamRequest) GetWorkerLogID() uint64
func (*CreateLogStreamRequest) GetWorkerStepID ¶
func (x *CreateLogStreamRequest) GetWorkerStepID() uint64
func (*CreateLogStreamRequest) ProtoMessage ¶
func (*CreateLogStreamRequest) ProtoMessage()
func (*CreateLogStreamRequest) ProtoReflect ¶
func (x *CreateLogStreamRequest) ProtoReflect() protoreflect.Message
func (*CreateLogStreamRequest) Reset ¶
func (x *CreateLogStreamRequest) Reset()
func (*CreateLogStreamRequest) String ¶
func (x *CreateLogStreamRequest) String() string
type CreateLogStreamResponse ¶
type CreateLogStreamResponse struct {
// LinesInserted is the number of lines that has been inserted in total by
// this stream.
LinesInserted uint64 `protobuf:"varint,1,opt,name=lines_inserted,json=linesInserted,proto3" json:"lines_inserted,omitempty"`
// contains filtered or unexported fields
}
CreateLogStreamResponse is the response returned after closing a log creation stream.
func (*CreateLogStreamResponse) Descriptor
deprecated
func (*CreateLogStreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateLogStreamResponse.ProtoReflect.Descriptor instead.
func (*CreateLogStreamResponse) GetLinesInserted ¶
func (x *CreateLogStreamResponse) GetLinesInserted() uint64
func (*CreateLogStreamResponse) ProtoMessage ¶
func (*CreateLogStreamResponse) ProtoMessage()
func (*CreateLogStreamResponse) ProtoReflect ¶
func (x *CreateLogStreamResponse) ProtoReflect() protoreflect.Message
func (*CreateLogStreamResponse) Reset ¶
func (x *CreateLogStreamResponse) Reset()
func (*CreateLogStreamResponse) String ¶
func (x *CreateLogStreamResponse) String() string
type UnimplementedBuildsServer ¶
type UnimplementedBuildsServer struct {
}
UnimplementedBuildsServer must be embedded to have forward compatible implementations.
func (UnimplementedBuildsServer) CreateLogStream ¶
func (UnimplementedBuildsServer) CreateLogStream(Builds_CreateLogStreamServer) error
type UnsafeBuildsServer ¶
type UnsafeBuildsServer interface {
// contains filtered or unexported methods
}
UnsafeBuildsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BuildsServer will result in compilation errors.