Documentation ¶
Overview ¶
Package rpc is a generated protocol buffer package.
It is generated from these files:
rpc.proto
It has these top-level messages:
AppArchive Version UpOptions UpRequest UpSummary UpMessage
Index ¶
- Variables
- func RegisterDraftServer(s *grpc.Server, srv DraftServer)
- type AppArchive
- type Client
- type ClientOpt
- type DraftClient
- type DraftServer
- type Draft_UpBuildClient
- type Draft_UpBuildServer
- type Draft_UpStreamClient
- type Draft_UpStreamServer
- type Handler
- type RecvStream
- type Server
- type ServerOpt
- type UpHandler
- type UpMessage
- func (*UpMessage) Descriptor() ([]byte, []int)
- func (m *UpMessage) GetMessage() isUpMessage_Message
- func (m *UpMessage) GetUpRequest() *UpRequest
- func (m *UpMessage) GetUpSummary() *UpSummary
- func (*UpMessage) ProtoMessage()
- func (m *UpMessage) Reset()
- func (m *UpMessage) String() string
- func (*UpMessage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type UpMessage_UpRequest
- type UpMessage_UpSummary
- type UpOptions
- type UpRequest
- func (*UpRequest) Descriptor() ([]byte, []int)
- func (m *UpRequest) GetAppArchive() *AppArchive
- func (m *UpRequest) GetAppName() string
- func (m *UpRequest) GetChart() *hapi_chart3.Chart
- func (m *UpRequest) GetNamespace() string
- func (m *UpRequest) GetOptions() *UpOptions
- func (m *UpRequest) GetValues() *hapi_chart.Config
- func (*UpRequest) ProtoMessage()
- func (m *UpRequest) Reset()
- func (m *UpRequest) String() string
- type UpSummary
- func (*UpSummary) Descriptor() ([]byte, []int)
- func (m *UpSummary) GetBuildId() string
- func (m *UpSummary) GetStageDesc() string
- func (m *UpSummary) GetStatusCode() UpSummary_StatusCode
- func (m *UpSummary) GetStatusText() string
- func (*UpSummary) ProtoMessage()
- func (m *UpSummary) Reset()
- func (m *UpSummary) String() string
- type UpSummary_StatusCode
- type Version
Constants ¶
This section is empty.
Variables ¶
var UpSummary_StatusCode_name = map[int32]string{
0: "UNKNOWN",
1: "LOGGING",
2: "STARTED",
3: "ONGOING",
4: "SUCCESS",
5: "FAILURE",
}
var UpSummary_StatusCode_value = map[string]int32{
"UNKNOWN": 0,
"LOGGING": 1,
"STARTED": 2,
"ONGOING": 3,
"SUCCESS": 4,
"FAILURE": 5,
}
Functions ¶
func RegisterDraftServer ¶
func RegisterDraftServer(s *grpc.Server, srv DraftServer)
Types ¶
type AppArchive ¶
type AppArchive struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` }
AppArchive represents the archived application included in a `draft up`.
func (*AppArchive) Descriptor ¶
func (*AppArchive) Descriptor() ([]byte, []int)
func (*AppArchive) GetContent ¶
func (m *AppArchive) GetContent() []byte
func (*AppArchive) GetName ¶
func (m *AppArchive) GetName() string
func (*AppArchive) ProtoMessage ¶
func (*AppArchive) ProtoMessage()
func (*AppArchive) Reset ¶
func (m *AppArchive) Reset()
func (*AppArchive) String ¶
func (m *AppArchive) String() string
type Client ¶
type Client interface { Version(context.Context) (*version.Version, error) UpBuild(context.Context, *UpRequest, chan<- *UpSummary) error UpStream(context.Context, <-chan *UpRequest, chan<- *UpSummary) error }
Client handles rpc to the Server.
type ClientOpt ¶
type ClientOpt func(*clientOpts)
ClientOpt is an optional configuration for a client.
func WithServerAddr ¶
WithServerAddr sets the draft server address the client should dial when invoking an rpc.
func WithServerHost ¶
WithServerHost sets the draft server host the client should use when invoking an rpc.
type DraftClient ¶
type DraftClient interface { // GetVersion returns the current version of the server. GetVersion(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*Version, error) // UpBuild returns a stream of the UpSummary within // for a given draft upload. // // Results are streamed rather than returned at once so // each stage of a draft up may be distinguished by the // client as a distinct message. UpBuild(ctx context.Context, in *UpMessage, opts ...grpc.CallOption) (Draft_UpBuildClient, error) // A Bidirectional streaming RPC. // // Accepts a stream of UpMessages each representing a separate // draft up. This is the api invoked by the draft client when // doing a draft up with watch enabled. UpStream(ctx context.Context, opts ...grpc.CallOption) (Draft_UpStreamClient, error) }
func NewDraftClient ¶
func NewDraftClient(cc *grpc.ClientConn) DraftClient
type DraftServer ¶
type DraftServer interface { // GetVersion returns the current version of the server. GetVersion(context.Context, *google_protobuf.Empty) (*Version, error) // UpBuild returns a stream of the UpSummary within // for a given draft upload. // // Results are streamed rather than returned at once so // each stage of a draft up may be distinguished by the // client as a distinct message. UpBuild(*UpMessage, Draft_UpBuildServer) error // A Bidirectional streaming RPC. // // Accepts a stream of UpMessages each representing a separate // draft up. This is the api invoked by the draft client when // doing a draft up with watch enabled. UpStream(Draft_UpStreamServer) error }
type Draft_UpBuildClient ¶
type Draft_UpBuildClient interface { Recv() (*UpMessage, error) grpc.ClientStream }
type Draft_UpBuildServer ¶
type Draft_UpBuildServer interface { Send(*UpMessage) error grpc.ServerStream }
type Draft_UpStreamClient ¶
type Draft_UpStreamServer ¶
type Handler ¶
type Handler interface { UpHandler }
Handler is the api surface to the rpc package. When calling Server.Server, requests are dispatched specific embedded interfaces within Handler.
type RecvStream ¶
RecvStream is returned by a Client for streaming summaries in response to a draft up. Stop should be called on return to notify the stream to close.
type ServerOpt ¶
type ServerOpt func(*serverOpts)
ServerOpt is an optional configuration for a server.
type UpHandler ¶
Up is the mechanism by which to accept draft up requests initiated by the draft client dispatched by the rpc.Server.
type UpMessage ¶
type UpMessage struct { // Types that are valid to be assigned to Message: // *UpMessage_UpRequest // *UpMessage_UpSummary Message isUpMessage_Message `protobuf_oneof:"Message"` }
UpMessage is the discriminated union of draft up messages exchanged between the client and server.
func (*UpMessage) Descriptor ¶
func (*UpMessage) GetMessage ¶
func (m *UpMessage) GetMessage() isUpMessage_Message
func (*UpMessage) GetUpRequest ¶
func (*UpMessage) GetUpSummary ¶
func (*UpMessage) ProtoMessage ¶
func (*UpMessage) ProtoMessage()
type UpMessage_UpRequest ¶
type UpMessage_UpRequest struct {
UpRequest *UpRequest `protobuf:"bytes,1,opt,name=up_request,json=upRequest,oneof"`
}
type UpMessage_UpSummary ¶
type UpMessage_UpSummary struct {
UpSummary *UpSummary `protobuf:"bytes,2,opt,name=up_summary,json=upSummary,oneof"`
}
type UpOptions ¶
type UpOptions struct {
ReleaseWait bool `protobuf:"varint,1,opt,name=release_wait,json=releaseWait" json:"release_wait,omitempty"`
}
UpOptions are configurable settings to use when issuing a `draft up`.
func (*UpOptions) Descriptor ¶
func (*UpOptions) GetReleaseWait ¶
func (*UpOptions) ProtoMessage ¶
func (*UpOptions) ProtoMessage()
type UpRequest ¶
type UpRequest struct { AppName string `protobuf:"bytes,1,opt,name=app_name,json=appName" json:"app_name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` Options *UpOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` Chart *hapi_chart3.Chart `protobuf:"bytes,4,opt,name=chart" json:"chart,omitempty"` Values *hapi_chart.Config `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` AppArchive *AppArchive `protobuf:"bytes,6,opt,name=app_archive,json=appArchive" json:"app_archive,omitempty"` }
UpRequest indicates the message sent by a draft client and received by a draft server to carry out a draft up command.
func (*UpRequest) Descriptor ¶
func (*UpRequest) GetAppArchive ¶
func (m *UpRequest) GetAppArchive() *AppArchive
func (*UpRequest) GetAppName ¶
func (*UpRequest) GetChart ¶
func (m *UpRequest) GetChart() *hapi_chart3.Chart
func (*UpRequest) GetNamespace ¶
func (*UpRequest) GetOptions ¶
func (*UpRequest) GetValues ¶
func (m *UpRequest) GetValues() *hapi_chart.Config
func (*UpRequest) ProtoMessage ¶
func (*UpRequest) ProtoMessage()
type UpSummary ¶
type UpSummary struct { // stage_desc describes the particular stage this summary // represents, e.g. "Build Docker Image." This is meant // to be a canonical summary of the stage's intent. StageDesc string `protobuf:"bytes,1,opt,name=stage_desc,json=stageDesc" json:"stage_desc,omitempty"` // status_text indicates a string description of the progress // or completion of draft up. StatusText string `protobuf:"bytes,2,opt,name=status_text,json=statusText" json:"status_text,omitempty"` // status_code indicates the status of the progress or // completion of a draft up. StatusCode UpSummary_StatusCode `protobuf:"varint,3,opt,name=status_code,json=statusCode,enum=rpc.UpSummary_StatusCode" json:"status_code,omitempty"` // build_id is the build identifier associated with this draft up build. BuildId string `protobuf:"bytes,4,opt,name=build_id,json=buildId" json:"build_id,omitempty"` }
UpSummary is the message returned when executing a draft up.
func (*UpSummary) Descriptor ¶
func (*UpSummary) GetBuildId ¶ added in v0.7.0
func (*UpSummary) GetStageDesc ¶
func (*UpSummary) GetStatusCode ¶
func (m *UpSummary) GetStatusCode() UpSummary_StatusCode
func (*UpSummary) GetStatusText ¶
func (*UpSummary) ProtoMessage ¶
func (*UpSummary) ProtoMessage()
type UpSummary_StatusCode ¶
type UpSummary_StatusCode int32
StatusCode is the enumeration of the possible status codes returned for a draft up. TODO: Flush this out.
const ( UpSummary_UNKNOWN UpSummary_StatusCode = 0 UpSummary_LOGGING UpSummary_StatusCode = 1 UpSummary_STARTED UpSummary_StatusCode = 2 UpSummary_ONGOING UpSummary_StatusCode = 3 UpSummary_SUCCESS UpSummary_StatusCode = 4 UpSummary_FAILURE UpSummary_StatusCode = 5 )
func (UpSummary_StatusCode) EnumDescriptor ¶
func (UpSummary_StatusCode) EnumDescriptor() ([]byte, []int)
func (UpSummary_StatusCode) String ¶
func (x UpSummary_StatusCode) String() string
type Version ¶
type Version struct { SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer" json:"sem_ver,omitempty"` GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` }
Version represents the wire description of a server's version.
func (*Version) Descriptor ¶
func (*Version) GetGitCommit ¶
func (*Version) GetGitTreeState ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()