registry

package
v0.0.0-...-bc1b0c2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint = endpointf.EndpointF

type Registrar

type Registrar interface {
	Registry(ctx context.Context, servant *ServantInstance) error
	Deregister(ctx context.Context, servant *ServantInstance) error
	// QueryServant service discovery
	QueryServant(ctx context.Context, id string) (activeEp []Endpoint, inactiveEp []Endpoint, err error)
	QueryServantBySet(ctx context.Context, id, set string) (activeEp []Endpoint, inactiveEp []Endpoint, err error)
}

Registrar is service registrar.

type ServantInstance

type ServantInstance struct {
	TarsVersion string   `json:"tars_version"`
	App         string   `json:"app"`
	Server      string   `json:"server"`
	EnableSet   bool     `json:"enable_set"`
	SetDivision string   `json:"set_division"`
	Protocol    string   `json:"protocol"`
	Servant     string   `json:"servant"`
	Endpoint    Endpoint `json:"endpoint"`
}

ServantInstance is an instance of a service in a discovery system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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