catalog

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

Catalog interface provide common function for work with Consul HTTP API /v1/catalog

type Registry

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

Registry is implementation of core.Registry interface

func NewRegistry

func NewRegistry(catalog Catalog, tag consul.Tag) *Registry

NewRegistry provide Registry as core.Registry implementation

func (*Registry) Deregister

func (r *Registry) Deregister(ctx context.Context, service *core.Service) error

Deregister make request for Catalog.Deregister by core.Service RegistrationID

func (*Registry) Fetch

func (r *Registry) Fetch(ctx context.Context) (core.Services, error)

Fetch make request for Catalog.Services plus Catalog.Service and try to cast result to core.Services

func (*Registry) Register

func (r *Registry) Register(ctx context.Context, service *core.Service) error

Register make request for Catalog.Register for core.Service

func (*Registry) WithLogger

func (r *Registry) WithLogger(logger core.LoggerInterface)

WithLogger is implementation of core.Loggable interface

Jump to

Keyboard shortcuts

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