utils

package
v0.0.0-...-30ff9d4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 118

Documentation

Index

Constants

View Source
const (
	// RegistryIP - Local IP for discover
	RegistryIP = "192.168.86.100"

	//LocalIP - Local IP for discover
	LocalIP = "127.0.0.1"

	// RegistryPort - port for discover
	RegistryPort = 50055

	// Discover the overall thing for discover
	Discover = "newrunner:50055"

	// LocalDiscover the overall thing for discover
	LocalDiscover = "127.0.0.1:50055"
)

Variables

This section is empty.

Functions

func BaseResolveAll

func BaseResolveAll(name string) ([]*pbdi.RegistryEntry, error)

ResolveAll gets all servers

func BuildContext

func BuildContext(label, origin string) (context.Context, context.CancelFunc)

BuildContext builds a context object for use

func FuzzyMatch

func FuzzyMatch(matcher, matchee proto.Message) error

FuzzyMatch experimental fuzzy match

func GetContextKey

func GetContextKey(ctx context.Context) (string, error)

func GetMaster

func GetMaster(name, caller string) (*pbdi.RegistryEntry, error)

GetMaster resolves out a server

func LFDial

func LFDial(host string) (*grpc.ClientConn, error)

LFDial fundamental dial

func LFDialServer

func LFDialServer(ctx context.Context, servername string) (*grpc.ClientConn, error)

LFDialServer dial a specific job

func LFDialSpecificServer

func LFDialSpecificServer(ctx context.Context, servername, host string) (*grpc.ClientConn, error)

LFDialServer dial a specific job

func LFFind

func LFFind(ctx context.Context, servername string) ([]string, error)

LFFind finds all servers

func ManualContext

func ManualContext(label string, t time.Duration) (context.Context, context.CancelFunc)

ManualContext builds a context object for use

func RefreshContext

func RefreshContext(ctx context.Context, key string, t time.Duration) (context.Context, context.CancelFunc)

func Resolve

func Resolve(name, origin string) (string, int32, error)

Resolve resolves out a server

func ResolveAll

func ResolveAll(name string) ([]*pbdi.RegistryEntry, error)

ResolveAll gets all servers

func ResolveV2

func ResolveV2(name string) (*pbdi.RegistryEntry, error)

Resolve resolves out a server

func ResolveV3

func ResolveV3(name string) ([]*pbdi.RegistryEntry, error)

ResolveV3 resolves out a server

func ResolveV3Client

func ResolveV3Client(name string) ([]*pbdi.RegistryEntry, error)

ResolveV3 resolves out a server

Types

This section is empty.

Jump to

Keyboard shortcuts

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