deployment

package
v0.0.0-...-837eb61 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 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

View Source
var File_automate_gateway_api_deployment_deployment_proto protoreflect.FileDescriptor

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 RegisterDeploymentHandlerServer

func RegisterDeploymentHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DeploymentServer) error

RegisterDeploymentHandlerServer registers the http handlers for service Deployment to "mux". UnaryRPC :call DeploymentServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterDeploymentServer

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

Types

type DeploymentClient

type DeploymentClient interface {
	GetVersion(ctx context.Context, in *emptypb.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.ClientConnInterface) DeploymentClient

type DeploymentServer

type DeploymentServer interface {
	GetVersion(context.Context, *emptypb.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, *emptypb.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 *emptypb.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"`
	// contains filtered or unexported fields
}

func (*ServiceVersion) Descriptor deprecated

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

Deprecated: Use ServiceVersion.ProtoReflect.Descriptor instead.

func (*ServiceVersion) GetName

func (x *ServiceVersion) GetName() string

func (*ServiceVersion) GetOrigin

func (x *ServiceVersion) GetOrigin() string

func (*ServiceVersion) GetRelease

func (x *ServiceVersion) GetRelease() string

func (*ServiceVersion) GetVersion

func (x *ServiceVersion) GetVersion() string

func (*ServiceVersion) ProtoMessage

func (*ServiceVersion) ProtoMessage()

func (*ServiceVersion) ProtoReflect

func (x *ServiceVersion) ProtoReflect() protoreflect.Message

func (*ServiceVersion) Reset

func (x *ServiceVersion) Reset()

func (*ServiceVersion) String

func (x *ServiceVersion) String() string

type ServiceVersionsRequest

type ServiceVersionsRequest struct {
	// contains filtered or unexported fields
}

func (*ServiceVersionsRequest) Descriptor deprecated

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

Deprecated: Use ServiceVersionsRequest.ProtoReflect.Descriptor instead.

func (*ServiceVersionsRequest) ProtoMessage

func (*ServiceVersionsRequest) ProtoMessage()

func (*ServiceVersionsRequest) ProtoReflect

func (x *ServiceVersionsRequest) ProtoReflect() protoreflect.Message

func (*ServiceVersionsRequest) Reset

func (x *ServiceVersionsRequest) Reset()

func (*ServiceVersionsRequest) String

func (x *ServiceVersionsRequest) String() string

type ServiceVersionsResponse

type ServiceVersionsResponse struct {
	Services []*ServiceVersion `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceVersionsResponse) Descriptor deprecated

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

Deprecated: Use ServiceVersionsResponse.ProtoReflect.Descriptor instead.

func (*ServiceVersionsResponse) GetServices

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

func (*ServiceVersionsResponse) ProtoMessage

func (*ServiceVersionsResponse) ProtoMessage()

func (*ServiceVersionsResponse) ProtoReflect

func (x *ServiceVersionsResponse) ProtoReflect() protoreflect.Message

func (*ServiceVersionsResponse) Reset

func (x *ServiceVersionsResponse) Reset()

func (*ServiceVersionsResponse) String

func (x *ServiceVersionsResponse) String() string

type UnimplementedDeploymentServer

type UnimplementedDeploymentServer struct {
}

UnimplementedDeploymentServer can be embedded to have forward compatible implementations.

func (*UnimplementedDeploymentServer) GetVersion

func (*UnimplementedDeploymentServer) ServiceVersions

type Version

type Version struct {
	BuildTimestamp string `protobuf:"bytes,1,opt,name=build_timestamp,json=buildTimestamp,proto3" json:"build_timestamp,omitempty"`
	// contains filtered or unexported fields
}

Version message

The manifest version constructed with: * build_timestamp

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetBuildTimestamp

func (x *Version) GetBuildTimestamp() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

func (x *Version) ProtoReflect() protoreflect.Message

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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