rpc

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const AddressSchemaTLS = "tls://"
View Source
const DefaultRpcTimeout = 30 * time.Second
View Source
const (
	ReadinessProbeService = "oxia-readiness"
)

Variables

View Source
var Default = &defaultProvider{}

Functions

func GetPeer

func GetPeer(ctx context.Context) string

Types

type ClientPool

type ClientPool interface {
	io.Closer
	GetClientRpc(target string) (proto.OxiaClientClient, error)
	GetHealthRpc(target string) (grpc_health_v1.HealthClient, io.Closer, error)
	GetCoordinationRpc(target string) (proto.OxiaCoordinationClient, error)
	GetReplicationRpc(target string) (proto.OxiaLogReplicationClient, error)

	// Clear all the pooled client instances for the given target
	Clear(target string)
}

func NewClientPool

func NewClientPool(tlsConf *tls.Config, authentication auth.Authentication) ClientPool

type GrpcProvider

type GrpcProvider interface {
	StartGrpcServer(name, bindAddress string, registerFunc func(grpc.ServiceRegistrar), tlsConf *tls.Config, options *auth.Options) (GrpcServer, error)
}

type GrpcServer

type GrpcServer interface {
	io.Closer

	Port() int
}

Jump to

Keyboard shortcuts

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