apollo

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApolloConfig added in v1.3.2

type ApolloConfig struct {
	AppID         string `json:"appID" yaml:"appID"`                 // 应用ID
	Cluster       string `json:"cluster" yaml:"cluster"`             // 集群
	NamespaceName string `json:"namespaceName" yaml:"namespaceName"` // 命名空间
	IP            string `json:"ip" yaml:"ip"`                       // 服务器IP
	Secret        string `json:"secret" yaml:"secret"`               // 密钥
}

type Client

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

func NewClient

func NewClient(cli agollo.Client, rawConfig *ApolloConfig) *Client

func SetUp

func SetUp(conf *ApolloConfig, logger log.LoggerInterface) (*Client, error)

SetUp 初始化apollo.

func (*Client) GetBool

func (i *Client) GetBool(key string) (bool, error)

GetBool 获取配置.

func (*Client) GetFloat64

func (i *Client) GetFloat64(key string) (float64, error)

GetFloat64 获取配置.

func (*Client) GetInt

func (i *Client) GetInt(key string) (int, error)

GetInt 获取配置.

func (*Client) GetInt32

func (i *Client) GetInt32(key string) (int32, error)

GetInt32 获取配置.

func (*Client) GetInt64

func (i *Client) GetInt64(key string) (int64, error)

GetInt64 获取配置.

func (*Client) GetJson

func (i *Client) GetJson(key string, v interface{}) error

GetJson 获取配置.

func (*Client) GetString

func (i *Client) GetString(key string) (string, error)

GetString 获取配置.

func (*Client) GetStringSlice added in v1.4.3

func (i *Client) GetStringSlice(key string) ([]string, error)

Jump to

Keyboard shortcuts

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