consul

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrator

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

func NewRegistrator

func NewRegistrator(client *liteconsul.Client, prefix string) *Registrator

func (*Registrator) RegisterFiles

func (r *Registrator) RegisterFiles(ctx context.Context, server string, files []*descriptorpb.FileDescriptorProto) error

type Registry

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

func NewRegistry

func NewRegistry(client *liteconsul.Client, prefix string, manager ServerFileManager) *Registry

func (*Registry) Sync

func (r *Registry) Sync(ctx context.Context, force bool) error

func (*Registry) Watch

func (r *Registry) Watch(ctx context.Context, update func() error) error

type ServerFileManager added in v0.3.0

type ServerFileManager interface {
	UpdateServer(server string, updated []*descriptorpb.FileDescriptorProto, deleted []string) error
	RemoveServer(server string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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