selector

package
v0.0.0-...-a87450f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init initializes the selectors for different key types.

func Sel

func Sel(ctx context.Context, method string, shardKeyValue any) (context.Context, *grpc.ClientConn, error)

Types

type CacheKey

type CacheKey[K util.IKey] struct {
	// contains filtered or unexported fields
}

CacheKey 缓存键

type HashRing

type HashRing[K util.IKey] struct {
	// contains filtered or unexported fields
}

func (*HashRing[K]) Select

func (p *HashRing[K]) Select(ctx context.Context, key K, method string) (*grpc.ClientConn, error)

type Mod

type Mod[K util.IKey] struct {
	// contains filtered or unexported fields
}

func (*Mod[K]) Select

func (p *Mod[K]) Select(ctx context.Context, key K, method string) (*grpc.ClientConn, error)

Jump to

Keyboard shortcuts

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