resolver

package
v0.0.0-...-432d548 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceNodes

type NamespaceNodes map[string]*rpc.NodeInfo

NamespaceNodes namespace node list

type Resolver

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

Resolver Configmap resolver

func NewResolver

func NewResolver(sharedIndexInformers []cache.SharedIndexInformer, idFilterPrefix string) *Resolver

NewResolver create Resolver and start

func (*Resolver) RegisterCalcShardIDFunc

func (b *Resolver) RegisterCalcShardIDFunc(f rpc.CalcShardIDFunc)

RegisterCalcShardIDFunc register calc shardID func

func (*Resolver) Resolve

func (c *Resolver) Resolve(namespace string, obj interface{}) (*rpc.NodeInfo, error)

Resolve resolve config

func (*Resolver) ResolveAll

func (c *Resolver) ResolveAll(namespace string) ([]*rpc.NodeInfo, error)

ResolveAll namespace all node

type StaticResolver

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

StaticResolver static router

func (*StaticResolver) RegisterCalcShardIDFunc

func (b *StaticResolver) RegisterCalcShardIDFunc(f rpc.CalcShardIDFunc)

RegisterCalcShardIDFunc register calc shardID func

func (*StaticResolver) Resolve

func (s *StaticResolver) Resolve(namespace string, obj interface{}) (*rpc.NodeInfo, error)

Resolve resolve config

func (*StaticResolver) ResolveAll

func (s *StaticResolver) ResolveAll(namespace string) ([]*rpc.NodeInfo, error)

ResolveAll namespace all node

func (*StaticResolver) SetIndex

func (s *StaticResolver) SetIndex(nodeInfosIndex map[string]NamespaceNodes)

SetIndex sets resolve static config

Jump to

Keyboard shortcuts

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