grpcutils

package
v0.0.0-...-ef451c8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReadinessProbeService = "chroma-readiness"
)

Variables

View Source
var Default = &defaultProvider{}

Functions

func BuildErrorForUUID

func BuildErrorForUUID(ID types.UniqueID, name string, err error) error

func BuildInternalGrpcError

func BuildInternalGrpcError(msg string) error

func BuildInvalidArgumentGrpcError

func BuildInvalidArgumentGrpcError(fieldName string, desc string) (error, error)

Types

type GrpcConfig

type GrpcConfig struct {
	// BindAddress is the address to bind the GRPC server to.
	BindAddress string

	// GRPC mTLS config
	CertPath string
	KeyPath  string
	CAPath   string
}

func (*GrpcConfig) MTLSEnabled

func (c *GrpcConfig) MTLSEnabled() bool

type GrpcProvider

type GrpcProvider interface {
	StartGrpcServer(name string, grpcConfig *GrpcConfig, registerFunc func(grpc.ServiceRegistrar)) (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