apollo

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(uri *url.URL, v interface{}) (config.Config, error)

func NewConfigSource

func NewConfigSource(opts ...Option) config.Source

Types

type Config

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

func (*Config) Load

func (c *Config) Load() ([]*config.KeyValue, error)

func (*Config) Watch

func (c *Config) Watch() (config.Watcher, error)

type Option

type Option func(*options)

func AppID

func AppID(appID string) Option

func Cluster

func Cluster(cluster string) Option

func MetaAddr

func MetaAddr(metaAddr string) Option

func Namespaces

func Namespaces(ns ...string) Option

func SkipLocalCache

func SkipLocalCache() Option

func WithLogger

func WithLogger(logger agollo.Logger) Option

WithLogger with middleware logger.

type Watcher

type Watcher struct {
	context.Context
	// contains filtered or unexported fields
}

func (*Watcher) Next

func (w *Watcher) Next() ([]*config.KeyValue, error)

func (*Watcher) Stop

func (w *Watcher) Stop() error

Jump to

Keyboard shortcuts

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