Documentation ¶
Index ¶
- Constants
- func InitConfigApollo(options config.Options) config.Client
- type Client
- func (apolloClient *Client) DeleteConfigsByKeys(keys []string, dimensionInfo string) (map[string]interface{}, error)
- func (apolloClient *Client) HTTPDo(method string, rawURL string, headers http.Header, body []byte) (resp *http.Response, err error)
- func (apolloClient *Client) NewApolloClient()
- func (apolloClient *Client) PullConfig(serviceName, version, app, env, key, contentType string) (interface{}, error)
- func (apolloClient *Client) PullConfigs(serviceName, version, app, env string) (map[string]interface{}, error)
- func (apolloClient *Client) PullConfigsByDI(dimensionInfo, diInfo string) (map[string]map[string]interface{}, error)
- func (apolloClient *Client) PushConfigs(data map[string]interface{}, dimensionInfo string) (map[string]interface{}, error)
- func (apolloClient *Client) Watch(f func(map[string]interface{}), errHandler func(err error)) error
Constants ¶
View Source
const (
//Name of the Plugin
Name = "apollo"
)
Variables ¶
This section is empty.
Functions ¶
func InitConfigApollo ¶
func InitConfigApollo(options config.Options) config.Client
InitConfigApollo initialize the Apollo Client
Types ¶
type Client ¶
type Client struct { URI string // contains filtered or unexported fields }
Client contains the implementation of Client
func (*Client) DeleteConfigsByKeys ¶
func (apolloClient *Client) DeleteConfigsByKeys(keys []string, dimensionInfo string) (map[string]interface{}, error)
DeleteConfigsByKeys not implemented
func (*Client) HTTPDo ¶
func (apolloClient *Client) HTTPDo(method string, rawURL string, headers http.Header, body []byte) (resp *http.Response, err error)
HTTPDo Use http-client package for rest communication
func (*Client) NewApolloClient ¶
func (apolloClient *Client) NewApolloClient()
NewApolloClient init's the necessary objects needed for seamless communication to apollo Server
func (*Client) PullConfig ¶
func (apolloClient *Client) PullConfig(serviceName, version, app, env, key, contentType string) (interface{}, error)
PullConfig is the implementation of the Client
func (*Client) PullConfigs ¶
func (apolloClient *Client) PullConfigs(serviceName, version, app, env string) (map[string]interface{}, error)
PullConfigs is the implementation of Client and pulls all the configuration for a given serviceName
func (*Client) PullConfigsByDI ¶
func (apolloClient *Client) PullConfigsByDI(dimensionInfo, diInfo string) (map[string]map[string]interface{}, error)
PullConfigsByDI returns the configuration for additional Projects in Apollo
Click to show internal directories.
Click to hide internal directories.