Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterHealthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHealthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthServiceClient) error
- func RegisterHealthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHealthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServiceServer) error
- func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
- type HealthServiceClient
- type HealthServiceServer
- type ReadyRequest
- func (*ReadyRequest) Descriptor() ([]byte, []int)deprecated
- func (*ReadyRequest) ProtoMessage()
- func (x *ReadyRequest) ProtoReflect() protoreflect.Message
- func (x *ReadyRequest) Reset()
- func (x *ReadyRequest) String() string
- func (m *ReadyRequest) Validate() error
- func (m *ReadyRequest) ValidateAll() error
- type ReadyRequestMultiError
- type ReadyRequestValidationError
- func (e ReadyRequestValidationError) Cause() error
- func (e ReadyRequestValidationError) Error() string
- func (e ReadyRequestValidationError) ErrorName() string
- func (e ReadyRequestValidationError) Field() string
- func (e ReadyRequestValidationError) Key() bool
- func (e ReadyRequestValidationError) Reason() string
- type ReadyResponse
- func (*ReadyResponse) Descriptor() ([]byte, []int)deprecated
- func (*ReadyResponse) ProtoMessage()
- func (x *ReadyResponse) ProtoReflect() protoreflect.Message
- func (x *ReadyResponse) Reset()
- func (x *ReadyResponse) String() string
- func (m *ReadyResponse) Validate() error
- func (m *ReadyResponse) ValidateAll() error
- type ReadyResponseMultiError
- type ReadyResponseValidationError
- func (e ReadyResponseValidationError) Cause() error
- func (e ReadyResponseValidationError) Error() string
- func (e ReadyResponseValidationError) ErrorName() string
- func (e ReadyResponseValidationError) Field() string
- func (e ReadyResponseValidationError) Key() bool
- func (e ReadyResponseValidationError) Reason() string
- type UnimplementedHealthServiceServer
- type UnsafeHealthServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_health_v1_service_proto protoreflect.FileDescriptor
var HealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "health.v1.HealthService", HandlerType: (*HealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ready", Handler: _HealthService_Ready_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "health/v1/service.proto", }
HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHealthServiceHandler ¶
func RegisterHealthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHealthServiceHandler registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHealthServiceHandlerClient ¶
func RegisterHealthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthServiceClient) error
RegisterHealthServiceHandlerClient registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthServiceClient" to call the correct interceptors.
func RegisterHealthServiceHandlerFromEndpoint ¶
func RegisterHealthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHealthServiceHandlerFromEndpoint is same as RegisterHealthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHealthServiceHandlerServer ¶
func RegisterHealthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServiceServer) error
RegisterHealthServiceHandlerServer registers the http handlers for service HealthService to "mux". UnaryRPC :call HealthServiceServer 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 RegisterHealthServiceHandlerFromEndpoint instead.
func RegisterHealthServiceServer ¶
func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
Types ¶
type HealthServiceClient ¶
type HealthServiceClient interface { // Ready ... Ready(ctx context.Context, in *ReadyRequest, opts ...grpc.CallOption) (*ReadyResponse, error) }
HealthServiceClient is the client API for HealthService 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 NewHealthServiceClient ¶
func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient
type HealthServiceServer ¶
type HealthServiceServer interface { // Ready ... Ready(context.Context, *ReadyRequest) (*ReadyResponse, error) }
HealthServiceServer is the server API for HealthService service. All implementations should embed UnimplementedHealthServiceServer for forward compatibility
type ReadyRequest ¶
type ReadyRequest struct {
// contains filtered or unexported fields
}
ReadyRequest ...
func (*ReadyRequest) Descriptor
deprecated
func (*ReadyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadyRequest.ProtoReflect.Descriptor instead.
func (*ReadyRequest) ProtoMessage ¶
func (*ReadyRequest) ProtoMessage()
func (*ReadyRequest) ProtoReflect ¶
func (x *ReadyRequest) ProtoReflect() protoreflect.Message
func (*ReadyRequest) Reset ¶
func (x *ReadyRequest) Reset()
func (*ReadyRequest) String ¶
func (x *ReadyRequest) String() string
func (*ReadyRequest) Validate ¶
func (m *ReadyRequest) Validate() error
Validate checks the field values on ReadyRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReadyRequest) ValidateAll ¶
func (m *ReadyRequest) ValidateAll() error
ValidateAll checks the field values on ReadyRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReadyRequestMultiError, or nil if none found.
type ReadyRequestMultiError ¶
type ReadyRequestMultiError []error
ReadyRequestMultiError is an error wrapping multiple validation errors returned by ReadyRequest.ValidateAll() if the designated constraints aren't met.
func (ReadyRequestMultiError) AllErrors ¶
func (m ReadyRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReadyRequestMultiError) Error ¶
func (m ReadyRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReadyRequestValidationError ¶
type ReadyRequestValidationError struct {
// contains filtered or unexported fields
}
ReadyRequestValidationError is the validation error returned by ReadyRequest.Validate if the designated constraints aren't met.
func (ReadyRequestValidationError) Cause ¶
func (e ReadyRequestValidationError) Cause() error
Cause function returns cause value.
func (ReadyRequestValidationError) Error ¶
func (e ReadyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ReadyRequestValidationError) ErrorName ¶
func (e ReadyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ReadyRequestValidationError) Field ¶
func (e ReadyRequestValidationError) Field() string
Field function returns field value.
func (ReadyRequestValidationError) Key ¶
func (e ReadyRequestValidationError) Key() bool
Key function returns key value.
func (ReadyRequestValidationError) Reason ¶
func (e ReadyRequestValidationError) Reason() string
Reason function returns reason value.
type ReadyResponse ¶
type ReadyResponse struct {
// contains filtered or unexported fields
}
ReadyResponse ...
func (*ReadyResponse) Descriptor
deprecated
func (*ReadyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadyResponse.ProtoReflect.Descriptor instead.
func (*ReadyResponse) ProtoMessage ¶
func (*ReadyResponse) ProtoMessage()
func (*ReadyResponse) ProtoReflect ¶
func (x *ReadyResponse) ProtoReflect() protoreflect.Message
func (*ReadyResponse) Reset ¶
func (x *ReadyResponse) Reset()
func (*ReadyResponse) String ¶
func (x *ReadyResponse) String() string
func (*ReadyResponse) Validate ¶
func (m *ReadyResponse) Validate() error
Validate checks the field values on ReadyResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReadyResponse) ValidateAll ¶
func (m *ReadyResponse) ValidateAll() error
ValidateAll checks the field values on ReadyResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReadyResponseMultiError, or nil if none found.
type ReadyResponseMultiError ¶
type ReadyResponseMultiError []error
ReadyResponseMultiError is an error wrapping multiple validation errors returned by ReadyResponse.ValidateAll() if the designated constraints aren't met.
func (ReadyResponseMultiError) AllErrors ¶
func (m ReadyResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReadyResponseMultiError) Error ¶
func (m ReadyResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReadyResponseValidationError ¶
type ReadyResponseValidationError struct {
// contains filtered or unexported fields
}
ReadyResponseValidationError is the validation error returned by ReadyResponse.Validate if the designated constraints aren't met.
func (ReadyResponseValidationError) Cause ¶
func (e ReadyResponseValidationError) Cause() error
Cause function returns cause value.
func (ReadyResponseValidationError) Error ¶
func (e ReadyResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ReadyResponseValidationError) ErrorName ¶
func (e ReadyResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ReadyResponseValidationError) Field ¶
func (e ReadyResponseValidationError) Field() string
Field function returns field value.
func (ReadyResponseValidationError) Key ¶
func (e ReadyResponseValidationError) Key() bool
Key function returns key value.
func (ReadyResponseValidationError) Reason ¶
func (e ReadyResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedHealthServiceServer ¶
type UnimplementedHealthServiceServer struct { }
UnimplementedHealthServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedHealthServiceServer) Ready ¶
func (UnimplementedHealthServiceServer) Ready(context.Context, *ReadyRequest) (*ReadyResponse, error)
type UnsafeHealthServiceServer ¶
type UnsafeHealthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.