deployment

package
v0.0.0-...-0490640 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package deployment is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDeploymentHandler

func RegisterDeploymentHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDeploymentHandler registers the http handlers for service Deployment to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDeploymentHandlerClient

func RegisterDeploymentHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DeploymentClient) error

RegisterDeploymentHandlerClient registers the http handlers for service Deployment to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DeploymentClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DeploymentClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DeploymentClient" to call the correct interceptors.

func RegisterDeploymentHandlerFromEndpoint

func RegisterDeploymentHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDeploymentHandlerFromEndpoint is same as RegisterDeploymentHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDeploymentServer

func RegisterDeploymentServer(s *grpc.Server, srv DeploymentServer)

Types

type DeploymentClient

type DeploymentClient interface {
	GetVersion(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Version, error)
	ServiceVersions(ctx context.Context, in *ServiceVersionsRequest, opts ...grpc.CallOption) (*ServiceVersionsResponse, error)
}

DeploymentClient is the client API for Deployment service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDeploymentClient

func NewDeploymentClient(cc *grpc.ClientConn) DeploymentClient

type DeploymentServer

type DeploymentServer interface {
	GetVersion(context.Context, *empty.Empty) (*Version, error)
	ServiceVersions(context.Context, *ServiceVersionsRequest) (*ServiceVersionsResponse, error)
}

DeploymentServer is the server API for Deployment service.

type DeploymentServerMock

type DeploymentServerMock struct {
	GetVersionFunc      func(context.Context, *empty.Empty) (*Version, error)
	ServiceVersionsFunc func(context.Context, *ServiceVersionsRequest) (*ServiceVersionsResponse, error)
	// contains filtered or unexported fields
}

DeploymentServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns

func NewDeploymentServerMock

func NewDeploymentServerMock() *DeploymentServerMock

NewDeploymentServerMock gives you a fresh instance of DeploymentServerMock.

func NewDeploymentServerMockWithoutValidation

func NewDeploymentServerMockWithoutValidation() *DeploymentServerMock

NewDeploymentServerMockWithoutValidation gives you a fresh instance of DeploymentServerMock which does not attempt to validate requests before passing them to their respective '*Func'.

func (*DeploymentServerMock) GetVersion

func (m *DeploymentServerMock) GetVersion(ctx context.Context, req *empty.Empty) (*Version, error)

func (*DeploymentServerMock) Reset

func (m *DeploymentServerMock) Reset()

Reset resets all overridden functions

func (*DeploymentServerMock) ServiceVersions

type ServiceVersion

type ServiceVersion struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Origin               string   `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
	Version              string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Release              string   `protobuf:"bytes,4,opt,name=release,proto3" json:"release,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServiceVersion) Descriptor

func (*ServiceVersion) Descriptor() ([]byte, []int)

func (*ServiceVersion) GetName

func (m *ServiceVersion) GetName() string

func (*ServiceVersion) GetOrigin

func (m *ServiceVersion) GetOrigin() string

func (*ServiceVersion) GetRelease

func (m *ServiceVersion) GetRelease() string

func (*ServiceVersion) GetVersion

func (m *ServiceVersion) GetVersion() string

func (*ServiceVersion) ProtoMessage

func (*ServiceVersion) ProtoMessage()

func (*ServiceVersion) Reset

func (m *ServiceVersion) Reset()

func (*ServiceVersion) String

func (m *ServiceVersion) String() string

func (*ServiceVersion) XXX_DiscardUnknown

func (m *ServiceVersion) XXX_DiscardUnknown()

func (*ServiceVersion) XXX_Marshal

func (m *ServiceVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceVersion) XXX_Merge

func (dst *ServiceVersion) XXX_Merge(src proto.Message)

func (*ServiceVersion) XXX_Size

func (m *ServiceVersion) XXX_Size() int

func (*ServiceVersion) XXX_Unmarshal

func (m *ServiceVersion) XXX_Unmarshal(b []byte) error

type ServiceVersionsRequest

type ServiceVersionsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServiceVersionsRequest) Descriptor

func (*ServiceVersionsRequest) Descriptor() ([]byte, []int)

func (*ServiceVersionsRequest) ProtoMessage

func (*ServiceVersionsRequest) ProtoMessage()

func (*ServiceVersionsRequest) Reset

func (m *ServiceVersionsRequest) Reset()

func (*ServiceVersionsRequest) String

func (m *ServiceVersionsRequest) String() string

func (*ServiceVersionsRequest) XXX_DiscardUnknown

func (m *ServiceVersionsRequest) XXX_DiscardUnknown()

func (*ServiceVersionsRequest) XXX_Marshal

func (m *ServiceVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceVersionsRequest) XXX_Merge

func (dst *ServiceVersionsRequest) XXX_Merge(src proto.Message)

func (*ServiceVersionsRequest) XXX_Size

func (m *ServiceVersionsRequest) XXX_Size() int

func (*ServiceVersionsRequest) XXX_Unmarshal

func (m *ServiceVersionsRequest) XXX_Unmarshal(b []byte) error

type ServiceVersionsResponse

type ServiceVersionsResponse struct {
	Services             []*ServiceVersion `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ServiceVersionsResponse) Descriptor

func (*ServiceVersionsResponse) Descriptor() ([]byte, []int)

func (*ServiceVersionsResponse) GetServices

func (m *ServiceVersionsResponse) GetServices() []*ServiceVersion

func (*ServiceVersionsResponse) ProtoMessage

func (*ServiceVersionsResponse) ProtoMessage()

func (*ServiceVersionsResponse) Reset

func (m *ServiceVersionsResponse) Reset()

func (*ServiceVersionsResponse) String

func (m *ServiceVersionsResponse) String() string

func (*ServiceVersionsResponse) XXX_DiscardUnknown

func (m *ServiceVersionsResponse) XXX_DiscardUnknown()

func (*ServiceVersionsResponse) XXX_Marshal

func (m *ServiceVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceVersionsResponse) XXX_Merge

func (dst *ServiceVersionsResponse) XXX_Merge(src proto.Message)

func (*ServiceVersionsResponse) XXX_Size

func (m *ServiceVersionsResponse) XXX_Size() int

func (*ServiceVersionsResponse) XXX_Unmarshal

func (m *ServiceVersionsResponse) XXX_Unmarshal(b []byte) error

type Version

type Version struct {
	BuildTimestamp       string   `protobuf:"bytes,1,opt,name=build_timestamp,json=buildTimestamp,proto3" json:"build_timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Version message

The manifest version constructed with: * build_timestamp

func (*Version) Descriptor

func (*Version) Descriptor() ([]byte, []int)

func (*Version) GetBuildTimestamp

func (m *Version) GetBuildTimestamp() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) String

func (m *Version) String() string

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (dst *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL