Documentation ¶
Overview ¶
Package blue is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBlueHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBlueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlueClient) error
- func RegisterBlueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBlueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlueServer) error
- func RegisterBlueServer(s grpc.ServiceRegistrar, srv BlueServer)
- type BlueClient
- type BlueServer
- type MeRequest
- type MeResponse
- type UnimplementedBlueServer
- type UnsafeBlueServer
Constants ¶
This section is empty.
Variables ¶
var Blue_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blueapi.blue.v1.Blue", HandlerType: (*BlueServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Me", Handler: _Blue_Me_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "blue/v1/blue.proto", }
Blue_ServiceDesc is the grpc.ServiceDesc for Blue service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_blue_v1_blue_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlueHandler ¶
RegisterBlueHandler registers the http handlers for service Blue to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBlueHandlerClient ¶
RegisterBlueHandlerClient registers the http handlers for service Blue to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlueClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlueClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BlueClient" to call the correct interceptors.
func RegisterBlueHandlerFromEndpoint ¶
func RegisterBlueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBlueHandlerFromEndpoint is same as RegisterBlueHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBlueHandlerServer ¶
RegisterBlueHandlerServer registers the http handlers for service Blue to "mux". UnaryRPC :call BlueServer 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 RegisterBlueHandlerFromEndpoint instead.
func RegisterBlueServer ¶
func RegisterBlueServer(s grpc.ServiceRegistrar, srv BlueServer)
Types ¶
type BlueClient ¶
type BlueClient interface {
Me(ctx context.Context, in *MeRequest, opts ...grpc.CallOption) (*MeResponse, error)
}
BlueClient is the client API for Blue 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 NewBlueClient ¶
func NewBlueClient(cc grpc.ClientConnInterface) BlueClient
type BlueServer ¶
type BlueServer interface { Me(context.Context, *MeRequest) (*MeResponse, error) // contains filtered or unexported methods }
BlueServer is the server API for Blue service. All implementations must embed UnimplementedBlueServer for forward compatibility
type MeRequest ¶
type MeRequest struct {
// contains filtered or unexported fields
}
Request message for Blue.Me.
func (*MeRequest) Descriptor
deprecated
func (*MeRequest) ProtoMessage ¶
func (*MeRequest) ProtoMessage()
func (*MeRequest) ProtoReflect ¶
func (x *MeRequest) ProtoReflect() protoreflect.Message
type MeResponse ¶
type MeResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Response message for Blue.Me.
func (*MeResponse) Descriptor
deprecated
func (*MeResponse) Descriptor() ([]byte, []int)
Deprecated: Use MeResponse.ProtoReflect.Descriptor instead.
func (*MeResponse) GetName ¶
func (x *MeResponse) GetName() string
func (*MeResponse) ProtoMessage ¶
func (*MeResponse) ProtoMessage()
func (*MeResponse) ProtoReflect ¶
func (x *MeResponse) ProtoReflect() protoreflect.Message
func (*MeResponse) Reset ¶
func (x *MeResponse) Reset()
func (*MeResponse) String ¶
func (x *MeResponse) String() string
type UnimplementedBlueServer ¶
type UnimplementedBlueServer struct { }
UnimplementedBlueServer must be embedded to have forward compatible implementations.
func (UnimplementedBlueServer) Me ¶
func (UnimplementedBlueServer) Me(context.Context, *MeRequest) (*MeResponse, error)
type UnsafeBlueServer ¶
type UnsafeBlueServer interface {
// contains filtered or unexported methods
}
UnsafeBlueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlueServer will result in compilation errors.