apolloconfig

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package apolloconfig APOLLO配置加载器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() box.BuildOption

Types

type ApolloLogger

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

func (*ApolloLogger) Log

func (al *ApolloLogger) Log(kv ...any)

type ConfigLoader

type ConfigLoader struct {
	AppId       string `flag:"appid" default:"" usage:"apollo appid" validate:"required"`
	Cluster     string `flag:"cluster" default:"" usage:"apollo cluster" validate:"required"`
	Addr        string `flag:"addr" default:"" usage:"apollo addr" validate:"required"`
	Namespace   string `` /* 137-byte string literal not displayed */
	CachePath   string `flag:"cache" default:"./configs/apollo_system.json" usage:"apollo cache path"`
	SyncTimeout int    `flag:"sync_timeout" default:"5" usage:"apollo sync timeout"`
	Secret      string `flag:"secret" default:"" usage:"apollo secret" validate:"required"`
	// contains filtered or unexported fields
}

func NewConfigLoader

func NewConfigLoader() *ConfigLoader

func (*ConfigLoader) Load

func (cl *ConfigLoader) Load(ctx context.Context, set func([]box.ConfigItem)) error

Jump to

Keyboard shortcuts

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