adminv1connect

package
v0.0.0-...-5aa5535 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdminServiceAddNonvoterProcedure is the fully-qualified name of the AdminService's AddNonvoter
	// RPC.
	AdminServiceAddNonvoterProcedure = "/admin.v1.AdminService/AddNonvoter"
	// AdminServiceAddVoterProcedure is the fully-qualified name of the AdminService's AddVoter RPC.
	AdminServiceAddVoterProcedure = "/admin.v1.AdminService/AddVoter"
	// AdminServiceAppliedIndexProcedure is the fully-qualified name of the AdminService's AppliedIndex
	// RPC.
	AdminServiceAppliedIndexProcedure = "/admin.v1.AdminService/AppliedIndex"
	// AdminServiceDemoteVoterProcedure is the fully-qualified name of the AdminService's DemoteVoter
	// RPC.
	AdminServiceDemoteVoterProcedure = "/admin.v1.AdminService/DemoteVoter"
	// AdminServiceGetConfigurationProcedure is the fully-qualified name of the AdminService's
	// GetConfiguration RPC.
	AdminServiceGetConfigurationProcedure = "/admin.v1.AdminService/GetConfiguration"
	// AdminServiceLastContactProcedure is the fully-qualified name of the AdminService's LastContact
	// RPC.
	AdminServiceLastContactProcedure = "/admin.v1.AdminService/LastContact"
	// AdminServiceLastIndexProcedure is the fully-qualified name of the AdminService's LastIndex RPC.
	AdminServiceLastIndexProcedure = "/admin.v1.AdminService/LastIndex"
	// AdminServiceLeaderProcedure is the fully-qualified name of the AdminService's Leader RPC.
	AdminServiceLeaderProcedure = "/admin.v1.AdminService/Leader"
	// AdminServiceLeadershipTransferProcedure is the fully-qualified name of the AdminService's
	// LeadershipTransfer RPC.
	AdminServiceLeadershipTransferProcedure = "/admin.v1.AdminService/LeadershipTransfer"
	// AdminServiceLeadershipTransferToServerProcedure is the fully-qualified name of the AdminService's
	// LeadershipTransferToServer RPC.
	AdminServiceLeadershipTransferToServerProcedure = "/admin.v1.AdminService/LeadershipTransferToServer"
	// AdminServiceRemoveServerProcedure is the fully-qualified name of the AdminService's RemoveServer
	// RPC.
	AdminServiceRemoveServerProcedure = "/admin.v1.AdminService/RemoveServer"
	// AdminServiceShutdownProcedure is the fully-qualified name of the AdminService's Shutdown RPC.
	AdminServiceShutdownProcedure = "/admin.v1.AdminService/Shutdown"
	// AdminServiceSnapshotProcedure is the fully-qualified name of the AdminService's Snapshot RPC.
	AdminServiceSnapshotProcedure = "/admin.v1.AdminService/Snapshot"
	// AdminServiceStateProcedure is the fully-qualified name of the AdminService's State RPC.
	AdminServiceStateProcedure = "/admin.v1.AdminService/State"
	// AdminServiceVerifyLeaderProcedure is the fully-qualified name of the AdminService's VerifyLeader
	// RPC.
	AdminServiceVerifyLeaderProcedure = "/admin.v1.AdminService/VerifyLeader"
	// AdminServiceJoinProcedure is the fully-qualified name of the AdminService's Join RPC.
	AdminServiceJoinProcedure = "/admin.v1.AdminService/Join"
	// AdminServiceAwaitProcedure is the fully-qualified name of the AdminService's Await RPC.
	AdminServiceAwaitProcedure = "/admin.v1.AdminService/Await"
	// AdminServiceForgetProcedure is the fully-qualified name of the AdminService's Forget RPC.
	AdminServiceForgetProcedure = "/admin.v1.AdminService/Forget"
	// AdminServiceBootstrapProcedure is the fully-qualified name of the AdminService's Bootstrap RPC.
	AdminServiceBootstrapProcedure = "/admin.v1.AdminService/Bootstrap"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// AdminServiceName is the fully-qualified name of the AdminService service.
	AdminServiceName = "admin.v1.AdminService"
)

Variables

This section is empty.

Functions

func NewAdminServiceHandler

func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type AdminServiceClient

type AdminServiceClient interface {
	AddNonvoter(context.Context, *connect.Request[v1.AddNonvoterRequest]) (*connect.Response[v1.Future], error)
	AddVoter(context.Context, *connect.Request[v1.AddVoterRequest]) (*connect.Response[v1.Future], error)
	AppliedIndex(context.Context, *connect.Request[v1.AppliedIndexRequest]) (*connect.Response[v1.AppliedIndexResponse], error)
	DemoteVoter(context.Context, *connect.Request[v1.DemoteVoterRequest]) (*connect.Response[v1.Future], error)
	GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
	LastContact(context.Context, *connect.Request[v1.LastContactRequest]) (*connect.Response[v1.LastContactResponse], error)
	LastIndex(context.Context, *connect.Request[v1.LastIndexRequest]) (*connect.Response[v1.LastIndexResponse], error)
	Leader(context.Context, *connect.Request[v1.LeaderRequest]) (*connect.Response[v1.LeaderResponse], error)
	LeadershipTransfer(context.Context, *connect.Request[v1.LeadershipTransferRequest]) (*connect.Response[v1.Future], error)
	LeadershipTransferToServer(context.Context, *connect.Request[v1.LeadershipTransferToServerRequest]) (*connect.Response[v1.Future], error)
	RemoveServer(context.Context, *connect.Request[v1.RemoveServerRequest]) (*connect.Response[v1.Future], error)
	Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.Future], error)
	Snapshot(context.Context, *connect.Request[v1.SnapshotRequest]) (*connect.Response[v1.Future], error)
	State(context.Context, *connect.Request[v1.StateRequest]) (*connect.Response[v1.StateResponse], error)
	VerifyLeader(context.Context, *connect.Request[v1.VerifyLeaderRequest]) (*connect.Response[v1.Future], error)
	Join(context.Context, *connect.Request[v1.JoinRequest]) (*connect.Response[emptypb.Empty], error)
	Await(context.Context, *connect.Request[v1.Future]) (*connect.Response[v1.AwaitResponse], error)
	Forget(context.Context, *connect.Request[v1.Future]) (*connect.Response[v1.ForgetResponse], error)
	Bootstrap(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)
}

AdminServiceClient is a client for the admin.v1.AdminService service.

func NewAdminServiceClient

func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AdminServiceClient

NewAdminServiceClient constructs a client for the admin.v1.AdminService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type AdminServiceHandler

type AdminServiceHandler interface {
	AddNonvoter(context.Context, *connect.Request[v1.AddNonvoterRequest]) (*connect.Response[v1.Future], error)
	AddVoter(context.Context, *connect.Request[v1.AddVoterRequest]) (*connect.Response[v1.Future], error)
	AppliedIndex(context.Context, *connect.Request[v1.AppliedIndexRequest]) (*connect.Response[v1.AppliedIndexResponse], error)
	DemoteVoter(context.Context, *connect.Request[v1.DemoteVoterRequest]) (*connect.Response[v1.Future], error)
	GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
	LastContact(context.Context, *connect.Request[v1.LastContactRequest]) (*connect.Response[v1.LastContactResponse], error)
	LastIndex(context.Context, *connect.Request[v1.LastIndexRequest]) (*connect.Response[v1.LastIndexResponse], error)
	Leader(context.Context, *connect.Request[v1.LeaderRequest]) (*connect.Response[v1.LeaderResponse], error)
	LeadershipTransfer(context.Context, *connect.Request[v1.LeadershipTransferRequest]) (*connect.Response[v1.Future], error)
	LeadershipTransferToServer(context.Context, *connect.Request[v1.LeadershipTransferToServerRequest]) (*connect.Response[v1.Future], error)
	RemoveServer(context.Context, *connect.Request[v1.RemoveServerRequest]) (*connect.Response[v1.Future], error)
	Shutdown(context.Context, *connect.Request[v1.ShutdownRequest]) (*connect.Response[v1.Future], error)
	Snapshot(context.Context, *connect.Request[v1.SnapshotRequest]) (*connect.Response[v1.Future], error)
	State(context.Context, *connect.Request[v1.StateRequest]) (*connect.Response[v1.StateResponse], error)
	VerifyLeader(context.Context, *connect.Request[v1.VerifyLeaderRequest]) (*connect.Response[v1.Future], error)
	Join(context.Context, *connect.Request[v1.JoinRequest]) (*connect.Response[emptypb.Empty], error)
	Await(context.Context, *connect.Request[v1.Future]) (*connect.Response[v1.AwaitResponse], error)
	Forget(context.Context, *connect.Request[v1.Future]) (*connect.Response[v1.ForgetResponse], error)
	Bootstrap(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)
}

AdminServiceHandler is an implementation of the admin.v1.AdminService service.

type UnimplementedAdminServiceHandler

type UnimplementedAdminServiceHandler struct{}

UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedAdminServiceHandler) AddNonvoter

func (UnimplementedAdminServiceHandler) AddVoter

func (UnimplementedAdminServiceHandler) Await

func (UnimplementedAdminServiceHandler) Bootstrap

func (UnimplementedAdminServiceHandler) DemoteVoter

func (UnimplementedAdminServiceHandler) Forget

func (UnimplementedAdminServiceHandler) Join

func (UnimplementedAdminServiceHandler) LeadershipTransfer

func (UnimplementedAdminServiceHandler) RemoveServer

func (UnimplementedAdminServiceHandler) Shutdown

func (UnimplementedAdminServiceHandler) Snapshot

func (UnimplementedAdminServiceHandler) VerifyLeader

Jump to

Keyboard shortcuts

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