status

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package status is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_apis_status_status_proto protoreflect.FileDescriptor
View Source
var StatusService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "voyagermesh.dev.hellogrpc.apis.status.StatusService",
	HandlerType: (*StatusServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _StatusService_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apis/status/status.proto",
}

StatusService_ServiceDesc is the grpc.ServiceDesc for StatusService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStatusServiceHandler

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

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

func RegisterStatusServiceHandlerClient

func RegisterStatusServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StatusServiceClient) error

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

func RegisterStatusServiceHandlerFromEndpoint

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

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

func RegisterStatusServiceHandlerServer

func RegisterStatusServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StatusServiceServer) error

RegisterStatusServiceHandlerServer registers the http handlers for service StatusService to "mux". UnaryRPC :call StatusServiceServer 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 RegisterStatusServiceHandlerFromEndpoint instead.

func RegisterStatusServiceServer

func RegisterStatusServiceServer(s grpc.ServiceRegistrar, srv StatusServiceServer)

Types

type StatusRequest

type StatusRequest struct {
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetVersion

func (x *StatusResponse) GetVersion() *Version

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type StatusServiceClient

type StatusServiceClient interface {
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

StatusServiceClient is the client API for StatusService 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 StatusServiceServer

type StatusServiceServer interface {
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// contains filtered or unexported methods
}

StatusServiceServer is the server API for StatusService service. All implementations must embed UnimplementedStatusServiceServer for forward compatibility

type UnimplementedStatusServiceServer

type UnimplementedStatusServiceServer struct {
}

UnimplementedStatusServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStatusServiceServer) Status

type UnsafeStatusServiceServer

type UnsafeStatusServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeStatusServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StatusServiceServer will result in compilation errors.

type Version

type Version struct {
	Name            string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version         string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	VersionStrategy string `protobuf:"bytes,3,opt,name=version_strategy,json=versionStrategy,proto3" json:"version_strategy,omitempty"`
	CommitHash      string `protobuf:"bytes,6,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"`
	GitBranch       string `protobuf:"bytes,7,opt,name=git_branch,json=gitBranch,proto3" json:"git_branch,omitempty"`
	GitTag          string `protobuf:"bytes,8,opt,name=git_tag,json=gitTag,proto3" json:"git_tag,omitempty"`
	CommitTimestamp string `protobuf:"bytes,9,opt,name=commit_timestamp,json=commitTimestamp,proto3" json:"commit_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetCommitHash

func (x *Version) GetCommitHash() string

func (*Version) GetCommitTimestamp

func (x *Version) GetCommitTimestamp() string

func (*Version) GetGitBranch

func (x *Version) GetGitBranch() string

func (*Version) GetGitTag

func (x *Version) GetGitTag() string

func (*Version) GetName

func (x *Version) GetName() string

func (*Version) GetVersion

func (x *Version) GetVersion() string

func (*Version) GetVersionStrategy

func (x *Version) GetVersionStrategy() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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