grpc

package
v0.0.0-...-2300135 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// GrpcConfig config
	GrpcConfig *grpcutils.GrpcConfig

	// System catalog provider
	SystemCatalogProvider string

	// MetaTable config
	DBConfig dbcore.DBConfig

	// Kubernetes config
	KubernetesNamespace string

	// Memberlist config
	ReconcileInterval time.Duration
	ReconcileCount    uint

	// Query service memberlist config
	QueryServiceMemberlistName string
	QueryServicePodLabel       string

	// Watcher config
	WatchInterval time.Duration

	// Compaction service memberlist config
	CompactionServiceMemberlistName string
	CompactionServicePodLabel       string

	// Config for soft deletes.
	SoftDeleteEnabled          bool
	SoftDeleteCleanupInterval  time.Duration
	SoftDeleteMaxAge           time.Duration
	SoftDeleteCleanupBatchSize uint

	// Config for testing
	Testing bool
}

type Server

type Server struct {
	coordinatorpb.UnimplementedSysDBServer
	// contains filtered or unexported fields
}

Server wraps Coordinator with GRPC services.

When Testing is set to true, the GRPC services will not be intialzed. This is convenient for end-to-end property based testing.

func New

func New(config Config) (*Server, error)

func NewWithGrpcProvider

func NewWithGrpcProvider(config Config, provider grpcutils.GrpcProvider, db *gorm.DB) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) CreateCollection

NOTE: In current implementation, we do not support updating the metadata of an existing collection via this RPC.

The call will fail if the collection already exists. Leaving the comments about cases 0,1,2,3 above for future reference. Refer to these issues for more context: https://github.com/chroma-core/chroma/issues/2390 https://github.com/chroma-core/chroma/pull/2810

func (*Server) ResetState

func (*Server) SetLastCompactionTimeForTenant

func (s *Server) SetLastCompactionTimeForTenant(ctx context.Context, req *coordinatorpb.SetLastCompactionTimeForTenantRequest) (*emptypb.Empty, error)

type SoftDeleteCleaner

type SoftDeleteCleaner struct {
	// contains filtered or unexported fields
}

func NewSoftDeleteCleaner

func NewSoftDeleteCleaner(coordinator coordinator.Coordinator, cleanupInterval time.Duration, maxAge time.Duration, limitPerCheck uint) *SoftDeleteCleaner

func (*SoftDeleteCleaner) Start

func (s *SoftDeleteCleaner) Start() error

func (*SoftDeleteCleaner) Stop

func (s *SoftDeleteCleaner) Stop() error

Jump to

Keyboard shortcuts

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