remote

package
v1.2.16 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedProvider = errors.New("This configuration manager is not supported")
)

Functions

func SetAgolloOptions

func SetAgolloOptions(opts ...agollo.Option)

func SetAppID

func SetAppID(appid string)

func SetConfigType

func SetConfigType(ct string)

Types

type ApolloConfig

type ApolloConfig struct {
	// apollo endpoint or url
	Endpoint string
	// apollo appid
	AppID string
	// config file type ,such as prop or yaml
	ConfigType string
	// apollo namespace
	Namespace string
}

ApolloConfig Apollo Config

type Extender

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

func NewApolloProvider

func NewApolloProvider(config ApolloConfig) (*Extender, error)

NewApolloProvider new apollo viper remote provider by apollo config

func (*Extender) Endpoint

func (rp *Extender) Endpoint() string

func (*Extender) GetViper

func (rp *Extender) GetViper() *viper.Viper

GetViper get viper instance

func (*Extender) Path

func (rp *Extender) Path() string

func (*Extender) Provider

func (rp *Extender) Provider() string

func (*Extender) SecretKeyring

func (rp *Extender) SecretKeyring() string

func (*Extender) WatchRemoteConfigOnChannel

func (rp *Extender) WatchRemoteConfigOnChannel() <-chan bool

WatchRemoteConfigOnChannel watch remote config changed on notify

Jump to

Keyboard shortcuts

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