Documentation ¶
Overview ¶
Package builder defines a gRPC protocol to leverage remote compute resources in a distri build.
Index ¶
- Variables
- func RegisterBuildServer(s *grpc.Server, srv BuildServer)
- type BuildClient
- type BuildProgress
- type BuildRequest
- func (*BuildRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BuildRequest) GetBuildFlag() []string
- func (x *BuildRequest) GetInputPath() []string
- func (x *BuildRequest) GetWorkingDirectory() string
- func (*BuildRequest) ProtoMessage()
- func (x *BuildRequest) ProtoReflect() protoreflect.Message
- func (x *BuildRequest) Reset()
- func (x *BuildRequest) String() string
- type BuildServer
- type Build_BuildClient
- type Build_BuildServer
- type Build_RetrieveClient
- type Build_RetrieveServer
- type Build_StoreClient
- type Build_StoreServer
- type Chunk
- type RetrieveRequest
- type StoreResponse
- type UnimplementedBuildServer
Constants ¶
This section is empty.
Variables ¶
var File_builder_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBuildServer ¶
func RegisterBuildServer(s *grpc.Server, srv BuildServer)
Types ¶
type BuildClient ¶
type BuildClient interface { // Store persists a file on the builder. // // Simple implementations might write the file to a directory and clean up // files older than a day every hour in a background (e.g. cron) job. // // Cluster implementations might write the file to a shared network directory // (most pragmatic/common), introduce an custom disk abstraction layer (most // elegant?) or stickily load-balance via a proxy job (only listed for // completeness as it limits build throughput). // // Cloud implementations might write the file to a key/value store with a TTL // of one day. // // Files are transferred as a stream of chunks with size 4096 bytes. Store(ctx context.Context, opts ...grpc.CallOption) (Build_StoreClient, error) // Build ensures the specified input_path are available in the current working // directory, changes into working_directory, then runs a distri build with // any additional build_flag specified. // // Build output artifacts paths are streamed in BuildProgress messages. Build(ctx context.Context, in *BuildRequest, opts ...grpc.CallOption) (Build_BuildClient, error) // Retrieve streams the file located at path in chunks of size 4096 bytes. Retrieve(ctx context.Context, in *RetrieveRequest, opts ...grpc.CallOption) (Build_RetrieveClient, error) }
BuildClient is the client API for Build service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBuildClient ¶
func NewBuildClient(cc grpc.ClientConnInterface) BuildClient
type BuildProgress ¶
type BuildProgress struct { // Build artifact paths (possibly empty, e.g. in keepalive progress updates), // e.g. build/emacs/emacs-amd64-26.2.squashfs. OutputPath []string `protobuf:"bytes,1,rep,name=output_path,json=outputPath,proto3" json:"output_path,omitempty"` // relative // contains filtered or unexported fields }
func (*BuildProgress) Descriptor
deprecated
func (*BuildProgress) Descriptor() ([]byte, []int)
Deprecated: Use BuildProgress.ProtoReflect.Descriptor instead.
func (*BuildProgress) GetOutputPath ¶
func (x *BuildProgress) GetOutputPath() []string
func (*BuildProgress) ProtoMessage ¶
func (*BuildProgress) ProtoMessage()
func (*BuildProgress) ProtoReflect ¶
func (x *BuildProgress) ProtoReflect() protoreflect.Message
func (*BuildProgress) Reset ¶
func (x *BuildProgress) Reset()
func (*BuildProgress) String ¶
func (x *BuildProgress) String() string
type BuildRequest ¶
type BuildRequest struct { WorkingDirectory string `protobuf:"bytes,1,opt,name=working_directory,json=workingDirectory,proto3" json:"working_directory,omitempty"` // relative InputPath []string `protobuf:"bytes,2,rep,name=input_path,json=inputPath,proto3" json:"input_path,omitempty"` // relative BuildFlag []string `protobuf:"bytes,3,rep,name=build_flag,json=buildFlag,proto3" json:"build_flag,omitempty"` // contains filtered or unexported fields }
func (*BuildRequest) Descriptor
deprecated
func (*BuildRequest) Descriptor() ([]byte, []int)
Deprecated: Use BuildRequest.ProtoReflect.Descriptor instead.
func (*BuildRequest) GetBuildFlag ¶
func (x *BuildRequest) GetBuildFlag() []string
func (*BuildRequest) GetInputPath ¶
func (x *BuildRequest) GetInputPath() []string
func (*BuildRequest) GetWorkingDirectory ¶
func (x *BuildRequest) GetWorkingDirectory() string
func (*BuildRequest) ProtoMessage ¶
func (*BuildRequest) ProtoMessage()
func (*BuildRequest) ProtoReflect ¶
func (x *BuildRequest) ProtoReflect() protoreflect.Message
func (*BuildRequest) Reset ¶
func (x *BuildRequest) Reset()
func (*BuildRequest) String ¶
func (x *BuildRequest) String() string
type BuildServer ¶
type BuildServer interface { // Store persists a file on the builder. // // Simple implementations might write the file to a directory and clean up // files older than a day every hour in a background (e.g. cron) job. // // Cluster implementations might write the file to a shared network directory // (most pragmatic/common), introduce an custom disk abstraction layer (most // elegant?) or stickily load-balance via a proxy job (only listed for // completeness as it limits build throughput). // // Cloud implementations might write the file to a key/value store with a TTL // of one day. // // Files are transferred as a stream of chunks with size 4096 bytes. Store(Build_StoreServer) error // Build ensures the specified input_path are available in the current working // directory, changes into working_directory, then runs a distri build with // any additional build_flag specified. // // Build output artifacts paths are streamed in BuildProgress messages. Build(*BuildRequest, Build_BuildServer) error // Retrieve streams the file located at path in chunks of size 4096 bytes. Retrieve(*RetrieveRequest, Build_RetrieveServer) error }
BuildServer is the server API for Build service.
type Build_BuildClient ¶
type Build_BuildClient interface { Recv() (*BuildProgress, error) grpc.ClientStream }
type Build_BuildServer ¶
type Build_BuildServer interface { Send(*BuildProgress) error grpc.ServerStream }
type Build_RetrieveClient ¶
type Build_RetrieveClient interface { Recv() (*Chunk, error) grpc.ClientStream }
type Build_RetrieveServer ¶
type Build_RetrieveServer interface { Send(*Chunk) error grpc.ServerStream }
type Build_StoreClient ¶
type Build_StoreClient interface { Send(*Chunk) error CloseAndRecv() (*StoreResponse, error) grpc.ClientStream }
type Build_StoreServer ¶
type Build_StoreServer interface { SendAndClose(*StoreResponse) error Recv() (*Chunk, error) grpc.ServerStream }
type Chunk ¶
type Chunk struct { // path is discarded in all but the first Store Chunk message per stream. // path is unset in all but the first Retrieve Chunk message per stream. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // relative, e.g. pkgs/emacs/build.textproto. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` // contains filtered or unexported fields }
func (*Chunk) Descriptor
deprecated
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) ProtoReflect ¶
func (x *Chunk) ProtoReflect() protoreflect.Message
type RetrieveRequest ¶
type RetrieveRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // relative, typically output_path from BuildProgress // contains filtered or unexported fields }
func (*RetrieveRequest) Descriptor
deprecated
func (*RetrieveRequest) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveRequest.ProtoReflect.Descriptor instead.
func (*RetrieveRequest) GetPath ¶
func (x *RetrieveRequest) GetPath() string
func (*RetrieveRequest) ProtoMessage ¶
func (*RetrieveRequest) ProtoMessage()
func (*RetrieveRequest) ProtoReflect ¶
func (x *RetrieveRequest) ProtoReflect() protoreflect.Message
func (*RetrieveRequest) Reset ¶
func (x *RetrieveRequest) Reset()
func (*RetrieveRequest) String ¶
func (x *RetrieveRequest) String() string
type StoreResponse ¶
type StoreResponse struct {
// contains filtered or unexported fields
}
func (*StoreResponse) Descriptor
deprecated
func (*StoreResponse) Descriptor() ([]byte, []int)
Deprecated: Use StoreResponse.ProtoReflect.Descriptor instead.
func (*StoreResponse) ProtoMessage ¶
func (*StoreResponse) ProtoMessage()
func (*StoreResponse) ProtoReflect ¶
func (x *StoreResponse) ProtoReflect() protoreflect.Message
func (*StoreResponse) Reset ¶
func (x *StoreResponse) Reset()
func (*StoreResponse) String ¶
func (x *StoreResponse) String() string
type UnimplementedBuildServer ¶
type UnimplementedBuildServer struct { }
UnimplementedBuildServer can be embedded to have forward compatible implementations.
func (*UnimplementedBuildServer) Build ¶
func (*UnimplementedBuildServer) Build(*BuildRequest, Build_BuildServer) error
func (*UnimplementedBuildServer) Retrieve ¶
func (*UnimplementedBuildServer) Retrieve(*RetrieveRequest, Build_RetrieveServer) error
func (*UnimplementedBuildServer) Store ¶
func (*UnimplementedBuildServer) Store(Build_StoreServer) error