v1

package
v0.88.9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package dashboard/v1 contains the API of Dashboard.

Index

Constants

View Source
const (
	// APIID contains identifier of this API
	APIID = "dashboard/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 0
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 0
)

Variables

This section is empty.

Functions

func RegisterDashboardServiceHandler

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

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

func RegisterDashboardServiceHandlerClient

func RegisterDashboardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DashboardServiceClient) error

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

func RegisterDashboardServiceHandlerFromEndpoint

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

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

func RegisterDashboardServiceHandlerServer

func RegisterDashboardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DashboardServiceServer) error

RegisterDashboardServiceHandlerServer registers the http handlers for service DashboardService to "mux". UnaryRPC :call DashboardServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterDashboardServiceServer

func RegisterDashboardServiceServer(s *grpc.Server, srv DashboardServiceServer)

Types

type DashboardServiceClient

type DashboardServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None (authenticated only)
	GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
	// Get the runtime version of this service.
	// This is the same info as we expose on window.VERSION and can be used to see if the latest version is loaded in the browser.
	// Required permissions:
	// - None (authenticated only)
	GetVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
}

DashboardServiceClient is the client API for DashboardService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDashboardServiceClient

func NewDashboardServiceClient(cc *grpc.ClientConn) DashboardServiceClient

type DashboardServiceServer

type DashboardServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None (authenticated only)
	GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
	// Get the runtime version of this service.
	// This is the same info as we expose on window.VERSION and can be used to see if the latest version is loaded in the browser.
	// Required permissions:
	// - None (authenticated only)
	GetVersion(context.Context, *v1.Empty) (*v1.Version, error)
}

DashboardServiceServer is the server API for DashboardService service.

type UnimplementedDashboardServiceServer

type UnimplementedDashboardServiceServer struct {
}

UnimplementedDashboardServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedDashboardServiceServer) GetAPIVersion

func (*UnimplementedDashboardServiceServer) GetVersion

Jump to

Keyboard shortcuts

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