v1

package
v0.0.0-...-da98b6b Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 28 Imported by: 1

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_health_v1_service_proto protoreflect.FileDescriptor
View Source
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.

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

Cause function returns cause value.

func (ReadyRequestValidationError) Error

Error satisfies the builtin error interface

func (ReadyRequestValidationError) ErrorName

func (e ReadyRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ReadyRequestValidationError) Field

Field function returns field value.

func (ReadyRequestValidationError) Key

Key function returns key value.

func (ReadyRequestValidationError) Reason

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

Cause function returns cause value.

func (ReadyResponseValidationError) Error

Error satisfies the builtin error interface

func (ReadyResponseValidationError) ErrorName

func (e ReadyResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ReadyResponseValidationError) Field

Field function returns field value.

func (ReadyResponseValidationError) Key

Key function returns key value.

func (ReadyResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedHealthServiceServer

type UnimplementedHealthServiceServer struct {
}

UnimplementedHealthServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedHealthServiceServer) Ready

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.

Jump to

Keyboard shortcuts

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