ConfigServer

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf = make(map[string]*Configurator)
)

Functions

func Server

func Server(c *Configurator)

Types

type Configurator

type Configurator struct {
	sync.RWMutex

	Conf   config.Config
	Update func(*Configurator)
	Opt    *Options
	Path   string
	// contains filtered or unexported fields
}

configurator 配置器

func New

func New(name string, source source.Source, update func(*Configurator)) *Configurator

type Option

type Option func(o *Options)

func WithSource

func WithSource(src source.Source) Option

type Options

type Options struct {
	Apps    map[string]interface{}
	Sources []source.Source
}

type Service

type Service struct{}

func (Service) Read

func (s Service) Read(ctx context.Context, req *mproto.ReadRequest) (rsp *mproto.ReadResponse, err error)

func (Service) Watch

func (s Service) Watch(req *mproto.WatchRequest, server mproto.Source_WatchServer) (err error)

Jump to

Keyboard shortcuts

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