proto

package
v0.0.0-...-e9fa201 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Max_Message_Size = pool.MaxMessageSize
	KeepAliveTime    = pool.KeepAliveTime
	KeepAliveTimeout = pool.KeepAliveTimeout
)

Re-export constants from pkg/grpc/pool for backwards compatibility

Variables

This section is empty.

Functions

func NewFileClient

func NewFileClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (file_pb.FileServiceClient, error)

func NewGRPCServer

func NewGRPCServer(opts ...grpc.ServerOption) *grpc.Server

func NewManagerClient

func NewManagerClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (manager_pb.ManagerServiceClient, error)

func NewMetadataClient

func NewMetadataClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (metadata_pb.MetadataServiceClient, error)

Types

type ConnectionFactory

type ConnectionFactory func() (*grpc.ClientConn, error)

ConnectionFactory is a function that creates a new gRPC client connection.

func DefaultFactory

func DefaultFactory(address string, opts ...grpc.DialOption) ConnectionFactory

type GRPCBalancer deprecated

type GRPCBalancer struct {
	grpc.ClientConnInterface
	// contains filtered or unexported fields
}

GRPCBalancer implements a simple connection balancer for gRPC clients.

Deprecated: Use pkg/grpc/pool.Pool[T] for new code. Pool provides:

  • Health checking via gRPC connectivity state
  • Per-host connection management
  • ClusterPool[T] for Raft cluster leader routing

func NewGRPCBalancer

func NewGRPCBalancer(factory ConnectionFactory, connCount uint64) *GRPCBalancer

func (*GRPCBalancer) Close

func (b *GRPCBalancer) Close() error

func (*GRPCBalancer) Invoke

func (b *GRPCBalancer) Invoke(ctx context.Context, method string, args, reply any, opts ...grpc.CallOption) error

func (*GRPCBalancer) NewStream

func (b *GRPCBalancer) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

type ServerAddress

type ServerAddress string

func NewServerAddress

func NewServerAddress(host string, port int, grpcPort int) ServerAddress

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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