apconfig

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CLUSTER        = "default"
	DEFAULT_NAMESAPCE_NAME = "application"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Apollo

type Apollo struct {
	AppConfig *agollo.AppConfig
}

func NewApollo

func NewApollo(serverName string) (*Apollo, error)

func NewCompleteApollo

func NewCompleteApollo(serverName, cluster, namespaceName string) (*Apollo, error)

func (*Apollo) Cache

func (a *Apollo) Cache(interval int64) *Apollo

func (*Apollo) CheckExist

func (a *Apollo) CheckExist() (bool, error)

func (*Apollo) CleanCache

func (a *Apollo) CleanCache() *Apollo

func (*Apollo) GetBoolValue

func (a *Apollo) GetBoolValue(key string, defaultValue bool) bool

func (*Apollo) GetConfigurations

func (a *Apollo) GetConfigurations(v interface{}) error

func (*Apollo) GetFloatValue

func (a *Apollo) GetFloatValue(key string, defaultValue float64) float64

func (*Apollo) GetIntValue

func (a *Apollo) GetIntValue(key string, defaultValue int) int

func (*Apollo) GetStringValue

func (a *Apollo) GetStringValue(key, defaultValue string) string

func (*Apollo) GetURL

func (a *Apollo) GetURL() string

func (*Apollo) ListenChangeEvent

func (a *Apollo) ListenChangeEvent() <-chan *agollo.ChangeEvent

func (*Apollo) SetAppId

func (a *Apollo) SetAppId(appId string) *Apollo

func (*Apollo) SetCluster

func (a *Apollo) SetCluster(cluster string) *Apollo

func (*Apollo) SetNamespaceName

func (a *Apollo) SetNamespaceName(namespace string) *Apollo

func (*Apollo) Start

func (a *Apollo) Start() error

func (*Apollo) StartWithLogger

func (a *Apollo) StartWithLogger(ctx context.Context, loggerInterface agollo.LoggerInterface) error

type ApolloLog

type ApolloLog struct {
	Logger     *log.LoggerContext
	ServerName string
}

func NewApolloLog

func NewApolloLog(serverName string) (*ApolloLog, error)

func (*ApolloLog) Debug

func (l *ApolloLog) Debug(v ...interface{})

func (*ApolloLog) Debugf

func (l *ApolloLog) Debugf(format string, params ...interface{})

func (*ApolloLog) Error

func (l *ApolloLog) Error(v ...interface{}) error

func (*ApolloLog) Errorf

func (l *ApolloLog) Errorf(format string, params ...interface{}) error

func (*ApolloLog) Info

func (l *ApolloLog) Info(v ...interface{})

func (*ApolloLog) Infof

func (l *ApolloLog) Infof(format string, params ...interface{})

func (*ApolloLog) Warn

func (l *ApolloLog) Warn(v ...interface{}) error

func (*ApolloLog) Warnf

func (l *ApolloLog) Warnf(format string, params ...interface{}) error

Jump to

Keyboard shortcuts

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