Documentation ¶
Overview ¶
Package k8_backend is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEnvValueHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEnvValueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EnvValueClient) error
- func RegisterEnvValueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEnvValueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EnvValueServer) error
- func RegisterEnvValueServer(s grpc.ServiceRegistrar, srv EnvValueServer)
- type EnvValueClient
- type EnvValueServer
- type Request
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetPodName() string
- func (x *Response) GetServerName() string
- func (x *Response) GetValue() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type UnimplementedEnvValueServer
- type UnsafeEnvValueServer
Constants ¶
This section is empty.
Variables ¶
var EnvValue_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.EnvValue", HandlerType: (*EnvValueServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetEnvValue", Handler: _EnvValue_GetEnvValue_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "env/env.proto", }
EnvValue_ServiceDesc is the grpc.ServiceDesc for EnvValue service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_env_env_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEnvValueHandler ¶
func RegisterEnvValueHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEnvValueHandler registers the http handlers for service EnvValue to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEnvValueHandlerClient ¶
func RegisterEnvValueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EnvValueClient) error
RegisterEnvValueHandlerClient registers the http handlers for service EnvValue to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EnvValueClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EnvValueClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EnvValueClient" to call the correct interceptors.
func RegisterEnvValueHandlerFromEndpoint ¶
func RegisterEnvValueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEnvValueHandlerFromEndpoint is same as RegisterEnvValueHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEnvValueHandlerServer ¶
func RegisterEnvValueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EnvValueServer) error
RegisterEnvValueHandlerServer registers the http handlers for service EnvValue to "mux". UnaryRPC :call EnvValueServer 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 RegisterEnvValueHandlerFromEndpoint instead.
func RegisterEnvValueServer ¶
func RegisterEnvValueServer(s grpc.ServiceRegistrar, srv EnvValueServer)
Types ¶
type EnvValueClient ¶
type EnvValueClient interface {
GetEnvValue(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
EnvValueClient is the client API for EnvValue 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 NewEnvValueClient ¶
func NewEnvValueClient(cc grpc.ClientConnInterface) EnvValueClient
type EnvValueServer ¶
type EnvValueServer interface { GetEnvValue(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
EnvValueServer is the server API for EnvValue service. All implementations must embed UnimplementedEnvValueServer for forward compatibility
type Request ¶
type Request struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { PodName string `protobuf:"bytes,1,opt,name=podName,proto3" json:"podName,omitempty"` ServerName string `protobuf:"bytes,2,opt,name=serverName,proto3" json:"serverName,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetPodName ¶
func (*Response) GetServerName ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedEnvValueServer ¶
type UnimplementedEnvValueServer struct { }
UnimplementedEnvValueServer must be embedded to have forward compatible implementations.
func (UnimplementedEnvValueServer) GetEnvValue ¶
type UnsafeEnvValueServer ¶
type UnsafeEnvValueServer interface {
// contains filtered or unexported methods
}
UnsafeEnvValueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EnvValueServer will result in compilation errors.