Documentation
¶
Index ¶
- Constants
- func NewFileClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (file_pb.FileServiceClient, error)
- func NewGRPCServer(opts ...grpc.ServerOption) *grpc.Server
- func NewManagerClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (manager_pb.ManagerServiceClient, error)
- func NewMetadataClient(address string, useBalancer bool, connCount uint64, opts ...grpc.DialOption) (metadata_pb.MetadataServiceClient, error)
- type ConnectionFactory
- type GRPCBalancerdeprecated
- type ServerAddress
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
Click to show internal directories.
Click to hide internal directories.