ref(*): remove grpc

pull/3945/head
Adam Reese 7 years ago
parent 8f58c9efdc
commit 7f6fa70a91
No known key found for this signature in database
GPG Key ID: 06F35E60A7A18DD6

@ -6,7 +6,6 @@ import_path = k8s.io/helm/pkg/proto/hapi
dst = ../pkg/proto
target = go
plugins = grpc
chart_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(chart_pkg),$(addprefix M,$(chart_pbs))))
chart_pbs = $(sort $(wildcard hapi/chart/*.proto))
@ -31,27 +30,23 @@ version_pkg = version
google_deps = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any
.PHONY: all
all: chart release services rudder version
all: chart release services version
.PHONY: chart
chart:
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias):$(dst) $(chart_pbs)
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias):$(dst) $(chart_pbs)
.PHONY: release
release:
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias),$(version_ias):$(dst) $(release_pbs)
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias),$(version_ias):$(dst) $(release_pbs)
.PHONY: services
services:
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias),$(version_ias),$(release_ias):$(dst) $(services_pbs)
.PHONY: rudder
rudder:
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias),$(version_ias),$(release_ias):$(dst) $(rudder_pbs)
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias),$(version_ias),$(release_ias):$(dst) $(services_pbs)
.PHONY: version
version:
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps):$(dst) $(version_pbs)
PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps):$(dst) $(version_pbs)
.PHONY: clean
clean:

@ -1,120 +0,0 @@
// Copyright 2017 The Kubernetes Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package hapi.services.rudder;
import "hapi/release/info.proto";
import "hapi/release/release.proto";
option go_package = "rudder";
service ReleaseModuleService {
rpc Version(VersionReleaseRequest) returns (VersionReleaseResponse) {
}
// InstallRelease requests installation of a chart as a new release.
rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse) {
}
// DeleteRelease requests deletion of a named release.
rpc DeleteRelease(DeleteReleaseRequest) returns (DeleteReleaseResponse) {
}
// RollbackRelease rolls back a release to a previous version.
rpc RollbackRelease(RollbackReleaseRequest) returns (RollbackReleaseResponse) {
}
// UpgradeRelease updates release content.
rpc UpgradeRelease(UpgradeReleaseRequest) returns (UpgradeReleaseResponse) {
}
// ReleaseStatus retrieves release status.
rpc ReleaseStatus(ReleaseStatusRequest) returns (ReleaseStatusResponse) {
}
}
message Result {
enum Status {
// No status set
UNKNOWN = 0;
// Operation was successful
SUCCESS = 1;
// Operation had no results (e.g. upgrade identical, rollback to same, delete non-existent)
UNCHANGED = 2;
// Operation failed
ERROR = 3;
}
string info = 1;
repeated string log = 2;
}
message VersionReleaseRequest {
}
message VersionReleaseResponse {
string name = 1; // The canonical name of the release module
string version = 2; // The version of the release module
}
message InstallReleaseRequest {
hapi.release.Release release = 1;
}
message InstallReleaseResponse {
hapi.release.Release release = 1;
Result result = 2;
}
message DeleteReleaseRequest {
hapi.release.Release release = 1;
}
message DeleteReleaseResponse {
hapi.release.Release release = 1;
Result result = 2;
}
message UpgradeReleaseRequest{
hapi.release.Release current = 1;
hapi.release.Release target = 2;
int64 Timeout = 3;
bool Wait = 4;
bool Recreate = 5;
bool Force = 6;
}
message UpgradeReleaseResponse{
hapi.release.Release release = 1;
Result result = 2;
}
message RollbackReleaseRequest{
hapi.release.Release current = 1;
hapi.release.Release target = 2;
int64 Timeout = 3;
bool Wait = 4;
bool Recreate = 5;
bool Force = 6;
}
message RollbackReleaseResponse{
hapi.release.Release release = 1;
Result result = 2;
}
message ReleaseStatusRequest{
hapi.release.Release release = 1;
}
message ReleaseStatusResponse{
hapi.release.Release release = 1;
hapi.release.Info info = 2;
}

@ -153,10 +153,6 @@ func (u *upgradeCmd) run() error {
if u.install {
// If a release does not exist, install it. If another error occurs during
// the check, ignore the error and continue with the upgrade.
//
// The returned error is a grpc.rpcError that wraps the message from the original error.
// So we're stuck doing string matching against the wrapped error, which is nested somewhere
// inside of the grpc.rpcError message.
releaseHistory, err := u.client.ReleaseHistory(u.release, 1)
if err == nil {

39
glide.lock generated

@ -1,5 +1,5 @@
hash: 6837936360d447b64aa7a09d3c89c18ac5540b009a57fc4d3227af299bf40268
updated: 2018-04-03T08:17:14.801847688-07:00
hash: b78f3d1f316474c2afd90074058cb5b1b4eda432b7bc270e4b76141199387d37
updated: 2018-04-16T23:16:59.971946077Z
imports:
- name: cloud.google.com/go
version: 3b1ae45394a234c385be014e9a488f2bb6eef821
@ -161,8 +161,6 @@ imports:
version: 787624de3eb7bd915c329cba748687a3b22666a6
subpackages:
- diskcache
- name: github.com/grpc-ecosystem/go-grpc-prometheus
version: 0c1b191dbfe51efdabe3c14b9f6f3b96429e0722
- name: github.com/hashicorp/golang-lru
version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4
subpackages:
@ -211,7 +209,7 @@ imports:
- name: github.com/peterbourgon/diskv
version: 5f041e8faa004a95c88a202771f4cc3e991971e6
- name: github.com/prometheus/client_golang
version: c5b7fccd204277076155f10851dad72b76a49317
version: e7e903064f5e9eb5da98208bae10b475d4db0f8c
subpackages:
- prometheus
- prometheus/promhttp
@ -271,9 +269,7 @@ imports:
- http2
- http2/hpack
- idna
- internal/timeseries
- lex/httplex
- trace
- name: golang.org/x/oauth2
version: a6bd8cefa1811bd24b86f8902872e4e8225f74c4
subpackages:
@ -321,31 +317,6 @@ imports:
- internal/remote_api
- internal/urlfetch
- urlfetch
- name: google.golang.org/genproto
version: 09f6ed296fc66555a25fe4ce95173148778dfa85
subpackages:
- googleapis/rpc/status
- name: google.golang.org/grpc
version: 5ffe3083946d5603a0578721101dc8165b1d5b5f
subpackages:
- balancer
- codes
- connectivity
- credentials
- grpclb/grpc_lb_v1/messages
- grpclog
- health
- health/grpc_health_v1
- internal
- keepalive
- metadata
- naming
- peer
- resolver
- stats
- status
- tap
- transport
- name: gopkg.in/inf.v0
version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
- name: gopkg.in/square/go-jose.v2
@ -620,7 +591,6 @@ imports:
- tools/clientcmd/api/v1
- tools/metrics
- tools/pager
- tools/portforward
- tools/record
- tools/reference
- tools/remotecommand
@ -641,7 +611,7 @@ imports:
- pkg/util/proto
- pkg/util/proto/validation
- name: k8s.io/kubernetes
version: a22f9fd34871d9dc9e5db2c02c713821d18ab2cd
version: a7685bbc127ba77463c89e363c5cec0d94a5f485
subpackages:
- pkg/api/events
- pkg/api/legacyscheme
@ -763,7 +733,6 @@ imports:
- pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake
- pkg/client/clientset_generated/internalclientset/typed/storage/internalversion
- pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake
- pkg/client/conditions
- pkg/cloudprovider
- pkg/controller
- pkg/controller/daemon

@ -1,8 +1,5 @@
package: k8s.io/helm
import:
- package: golang.org/x/net
subpackages:
- context
- package: github.com/spf13/cobra
version: f62e98d28ab7ad31d707ba837a966378465c7b57
- package: github.com/spf13/pflag
@ -24,8 +21,6 @@ import:
- proto
- ptypes/any
- ptypes/timestamp
- package: google.golang.org/grpc
version: 1.7.2
- package: github.com/gosuri/uitable
- package: github.com/asaskevich/govalidator
version: ^4.0.0
@ -43,9 +38,6 @@ import:
- package: github.com/evanphx/json-patch
- package: github.com/BurntSushi/toml
version: ~0.3.0
- package: github.com/prometheus/client_golang
version: 0.8.0
- package: github.com/grpc-ecosystem/go-grpc-prometheus
- package: k8s.io/kubernetes
version: release-1.10

@ -27,10 +27,6 @@ import (
"k8s.io/helm/pkg/tiller/environment"
)
// maxMsgSize use 20MB as the default message size limit.
// grpc library default is 4MB
const maxMsgSize = 1024 * 1024 * 20
// Client manages client side of the Helm-Tiller protocol.
type Client struct {
opts options

@ -30,11 +30,6 @@ import math "math"
import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release"
import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
@ -430,253 +425,6 @@ func init() {
proto.RegisterEnum("hapi.services.rudder.Result_Status", Result_Status_name, Result_Status_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for ReleaseModuleService service
type ReleaseModuleServiceClient interface {
Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release.
InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error)
// DeleteRelease requests deletion of a named release.
DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error)
// RollbackRelease rolls back a release to a previous version.
RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error)
// UpgradeRelease updates release content.
UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error)
// ReleaseStatus retrieves release status.
ReleaseStatus(ctx context.Context, in *ReleaseStatusRequest, opts ...grpc.CallOption) (*ReleaseStatusResponse, error)
}
type releaseModuleServiceClient struct {
cc *grpc.ClientConn
}
func NewReleaseModuleServiceClient(cc *grpc.ClientConn) ReleaseModuleServiceClient {
return &releaseModuleServiceClient{cc}
}
func (c *releaseModuleServiceClient) Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error) {
out := new(VersionReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/Version", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseModuleServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) {
out := new(InstallReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/InstallRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseModuleServiceClient) DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error) {
out := new(DeleteReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/DeleteRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseModuleServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) {
out := new(RollbackReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/RollbackRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseModuleServiceClient) UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error) {
out := new(UpgradeReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseModuleServiceClient) ReleaseStatus(ctx context.Context, in *ReleaseStatusRequest, opts ...grpc.CallOption) (*ReleaseStatusResponse, error) {
out := new(ReleaseStatusResponse)
err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ReleaseModuleService service
type ReleaseModuleServiceServer interface {
Version(context.Context, *VersionReleaseRequest) (*VersionReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release.
InstallRelease(context.Context, *InstallReleaseRequest) (*InstallReleaseResponse, error)
// DeleteRelease requests deletion of a named release.
DeleteRelease(context.Context, *DeleteReleaseRequest) (*DeleteReleaseResponse, error)
// RollbackRelease rolls back a release to a previous version.
RollbackRelease(context.Context, *RollbackReleaseRequest) (*RollbackReleaseResponse, error)
// UpgradeRelease updates release content.
UpgradeRelease(context.Context, *UpgradeReleaseRequest) (*UpgradeReleaseResponse, error)
// ReleaseStatus retrieves release status.
ReleaseStatus(context.Context, *ReleaseStatusRequest) (*ReleaseStatusResponse, error)
}
func RegisterReleaseModuleServiceServer(s *grpc.Server, srv ReleaseModuleServiceServer) {
s.RegisterService(&_ReleaseModuleService_serviceDesc, srv)
}
func _ReleaseModuleService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VersionReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).Version(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/Version",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).Version(ctx, req.(*VersionReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseModuleService_InstallRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InstallReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).InstallRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/InstallRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).InstallRelease(ctx, req.(*InstallReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseModuleService_DeleteRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).DeleteRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/DeleteRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).DeleteRelease(ctx, req.(*DeleteReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseModuleService_RollbackRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RollbackReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).RollbackRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/RollbackRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).RollbackRelease(ctx, req.(*RollbackReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseModuleService_UpgradeRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpgradeReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).UpgradeRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).UpgradeRelease(ctx, req.(*UpgradeReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseModuleService_ReleaseStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReleaseStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseModuleServiceServer).ReleaseStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseModuleServiceServer).ReleaseStatus(ctx, req.(*ReleaseStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ReleaseModuleService_serviceDesc = grpc.ServiceDesc{
ServiceName: "hapi.services.rudder.ReleaseModuleService",
HandlerType: (*ReleaseModuleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Version",
Handler: _ReleaseModuleService_Version_Handler,
},
{
MethodName: "InstallRelease",
Handler: _ReleaseModuleService_InstallRelease_Handler,
},
{
MethodName: "DeleteRelease",
Handler: _ReleaseModuleService_DeleteRelease_Handler,
},
{
MethodName: "RollbackRelease",
Handler: _ReleaseModuleService_RollbackRelease_Handler,
},
{
MethodName: "UpgradeRelease",
Handler: _ReleaseModuleService_UpgradeRelease_Handler,
},
{
MethodName: "ReleaseStatus",
Handler: _ReleaseModuleService_ReleaseStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "hapi/rudder/rudder.proto",
}
func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{

@ -43,11 +43,6 @@ import hapi_release1 "k8s.io/helm/pkg/proto/hapi/release"
import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release"
import hapi_version "k8s.io/helm/pkg/proto/hapi/version"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
@ -915,456 +910,6 @@ func init() {
proto.RegisterEnum("hapi.services.tiller.ListSort_SortOrder", ListSort_SortOrder_name, ListSort_SortOrder_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for ReleaseService service
type ReleaseServiceClient interface {
// ListReleases retrieves release history.
// TODO: Allow filtering the set of releases by
// release status. By default, ListAllReleases returns the releases who
// current status is "Active".
ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (ReleaseService_ListReleasesClient, error)
// GetReleasesStatus retrieves status information for the specified release.
GetReleaseStatus(ctx context.Context, in *GetReleaseStatusRequest, opts ...grpc.CallOption) (*GetReleaseStatusResponse, error)
// GetReleaseContent retrieves the release content (chart + value) for the specified release.
GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error)
// UpdateRelease updates release content.
UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release.
InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error)
// UninstallRelease requests deletion of a named release.
UninstallRelease(ctx context.Context, in *UninstallReleaseRequest, opts ...grpc.CallOption) (*UninstallReleaseResponse, error)
// GetVersion returns the current version of the server.
GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
// RollbackRelease rolls back a release to a previous version.
RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error)
// ReleaseHistory retrieves a releasse's history.
GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error)
// RunReleaseTest executes the tests defined of a named release
RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error)
}
type releaseServiceClient struct {
cc *grpc.ClientConn
}
func NewReleaseServiceClient(cc *grpc.ClientConn) ReleaseServiceClient {
return &releaseServiceClient{cc}
}
func (c *releaseServiceClient) ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (ReleaseService_ListReleasesClient, error) {
stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[0], c.cc, "/hapi.services.tiller.ReleaseService/ListReleases", opts...)
if err != nil {
return nil, err
}
x := &releaseServiceListReleasesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type ReleaseService_ListReleasesClient interface {
Recv() (*ListReleasesResponse, error)
grpc.ClientStream
}
type releaseServiceListReleasesClient struct {
grpc.ClientStream
}
func (x *releaseServiceListReleasesClient) Recv() (*ListReleasesResponse, error) {
m := new(ListReleasesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *releaseServiceClient) GetReleaseStatus(ctx context.Context, in *GetReleaseStatusRequest, opts ...grpc.CallOption) (*GetReleaseStatusResponse, error) {
out := new(GetReleaseStatusResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseStatus", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) {
out := new(GetReleaseContentResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseContent", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) {
out := new(UpdateReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) {
out := new(InstallReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/InstallRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) UninstallRelease(ctx context.Context, in *UninstallReleaseRequest, opts ...grpc.CallOption) (*UninstallReleaseResponse, error) {
out := new(UninstallReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UninstallRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) {
out := new(GetVersionResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetVersion", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) {
out := new(RollbackReleaseResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/RollbackRelease", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error) {
out := new(GetHistoryResponse)
err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetHistory", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *releaseServiceClient) RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error) {
stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...)
if err != nil {
return nil, err
}
x := &releaseServiceRunReleaseTestClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type ReleaseService_RunReleaseTestClient interface {
Recv() (*TestReleaseResponse, error)
grpc.ClientStream
}
type releaseServiceRunReleaseTestClient struct {
grpc.ClientStream
}
func (x *releaseServiceRunReleaseTestClient) Recv() (*TestReleaseResponse, error) {
m := new(TestReleaseResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for ReleaseService service
type ReleaseServiceServer interface {
// ListReleases retrieves release history.
// TODO: Allow filtering the set of releases by
// release status. By default, ListAllReleases returns the releases who
// current status is "Active".
ListReleases(*ListReleasesRequest, ReleaseService_ListReleasesServer) error
// GetReleasesStatus retrieves status information for the specified release.
GetReleaseStatus(context.Context, *GetReleaseStatusRequest) (*GetReleaseStatusResponse, error)
// GetReleaseContent retrieves the release content (chart + value) for the specified release.
GetReleaseContent(context.Context, *GetReleaseContentRequest) (*GetReleaseContentResponse, error)
// UpdateRelease updates release content.
UpdateRelease(context.Context, *UpdateReleaseRequest) (*UpdateReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release.
InstallRelease(context.Context, *InstallReleaseRequest) (*InstallReleaseResponse, error)
// UninstallRelease requests deletion of a named release.
UninstallRelease(context.Context, *UninstallReleaseRequest) (*UninstallReleaseResponse, error)
// GetVersion returns the current version of the server.
GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
// RollbackRelease rolls back a release to a previous version.
RollbackRelease(context.Context, *RollbackReleaseRequest) (*RollbackReleaseResponse, error)
// ReleaseHistory retrieves a releasse's history.
GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
// RunReleaseTest executes the tests defined of a named release
RunReleaseTest(*TestReleaseRequest, ReleaseService_RunReleaseTestServer) error
}
func RegisterReleaseServiceServer(s *grpc.Server, srv ReleaseServiceServer) {
s.RegisterService(&_ReleaseService_serviceDesc, srv)
}
func _ReleaseService_ListReleases_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ListReleasesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ReleaseServiceServer).ListReleases(m, &releaseServiceListReleasesServer{stream})
}
type ReleaseService_ListReleasesServer interface {
Send(*ListReleasesResponse) error
grpc.ServerStream
}
type releaseServiceListReleasesServer struct {
grpc.ServerStream
}
func (x *releaseServiceListReleasesServer) Send(m *ListReleasesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _ReleaseService_GetReleaseStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReleaseStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).GetReleaseStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/GetReleaseStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).GetReleaseStatus(ctx, req.(*GetReleaseStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_GetReleaseContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReleaseContentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).GetReleaseContent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/GetReleaseContent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).GetReleaseContent(ctx, req.(*GetReleaseContentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_UpdateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).UpdateRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/UpdateRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).UpdateRelease(ctx, req.(*UpdateReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_InstallRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InstallReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).InstallRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/InstallRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).InstallRelease(ctx, req.(*InstallReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_UninstallRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UninstallReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).UninstallRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/UninstallRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).UninstallRelease(ctx, req.(*UninstallReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVersionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).GetVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/GetVersion",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).GetVersion(ctx, req.(*GetVersionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_RollbackRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RollbackReleaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).RollbackRelease(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/RollbackRelease",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).RollbackRelease(ctx, req.(*RollbackReleaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_GetHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReleaseServiceServer).GetHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hapi.services.tiller.ReleaseService/GetHistory",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReleaseServiceServer).GetHistory(ctx, req.(*GetHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReleaseService_RunReleaseTest_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(TestReleaseRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ReleaseServiceServer).RunReleaseTest(m, &releaseServiceRunReleaseTestServer{stream})
}
type ReleaseService_RunReleaseTestServer interface {
Send(*TestReleaseResponse) error
grpc.ServerStream
}
type releaseServiceRunReleaseTestServer struct {
grpc.ServerStream
}
func (x *releaseServiceRunReleaseTestServer) Send(m *TestReleaseResponse) error {
return x.ServerStream.SendMsg(m)
}
var _ReleaseService_serviceDesc = grpc.ServiceDesc{
ServiceName: "hapi.services.tiller.ReleaseService",
HandlerType: (*ReleaseServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetReleaseStatus",
Handler: _ReleaseService_GetReleaseStatus_Handler,
},
{
MethodName: "GetReleaseContent",
Handler: _ReleaseService_GetReleaseContent_Handler,
},
{
MethodName: "UpdateRelease",
Handler: _ReleaseService_UpdateRelease_Handler,
},
{
MethodName: "InstallRelease",
Handler: _ReleaseService_InstallRelease_Handler,
},
{
MethodName: "UninstallRelease",
Handler: _ReleaseService_UninstallRelease_Handler,
},
{
MethodName: "GetVersion",
Handler: _ReleaseService_GetVersion_Handler,
},
{
MethodName: "RollbackRelease",
Handler: _ReleaseService_RollbackRelease_Handler,
},
{
MethodName: "GetHistory",
Handler: _ReleaseService_GetHistory_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ListReleases",
Handler: _ReleaseService_ListReleases_Handler,
ServerStreams: true,
},
{
StreamName: "RunReleaseTest",
Handler: _ReleaseService_RunReleaseTest_Handler,
ServerStreams: true,
},
},
Metadata: "hapi/services/tiller.proto",
}
func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{

Loading…
Cancel
Save