protov1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_v1_gateway_api_proto protoreflect.FileDescriptor

Functions

func RegisterGatewayAPIHandler

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

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

func RegisterGatewayAPIHandlerClient

func RegisterGatewayAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GatewayAPIClient) error

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

func RegisterGatewayAPIHandlerFromEndpoint

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

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

func RegisterGatewayAPIHandlerServer

func RegisterGatewayAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GatewayAPIServer) error

RegisterGatewayAPIHandlerServer registers the http handlers for service GatewayAPI to "mux". UnaryRPC :call GatewayAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGatewayAPIHandlerFromEndpoint instead.

func RegisterGatewayAPIServer

func RegisterGatewayAPIServer(s *grpc.Server, srv GatewayAPIServer)

Types

type GatewayAPIClient

type GatewayAPIClient interface {
	// Reachability test.
	Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PingResponse, error)
}

GatewayAPIClient is the client API for GatewayAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGatewayAPIClient

func NewGatewayAPIClient(cc grpc.ClientConnInterface) GatewayAPIClient

type GatewayAPIServer

type GatewayAPIServer interface {
	// Reachability test.
	Ping(context.Context, *empty.Empty) (*PingResponse, error)
	// contains filtered or unexported methods
}

GatewayAPIServer is the server API for GatewayAPI service. All implementations must embed UnimplementedGatewayAPIServer for forward compatibility

type PingResponse

type PingResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

Sample reachability response.

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetOk

func (x *PingResponse) GetOk() bool

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

func (*PingResponse) Validate

func (this *PingResponse) Validate() error

type UnimplementedGatewayAPIServer

type UnimplementedGatewayAPIServer struct {
}

UnimplementedGatewayAPIServer must be embedded to have forward compatible implementations.

func (*UnimplementedGatewayAPIServer) Ping

Jump to

Keyboard shortcuts

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