apollo

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*base.Context
	// contains filtered or unexported fields
}

Client defines the apollo client.

func MakeClient

func MakeClient(c *base.Context, fileRaw chan base.FileRawWait) *Client

MakeClient makes a apollo client.

func (*Client) CreateMetaServers

func (c *Client) CreateMetaServers() []string

CreateMetaServers creates the meta servers addresses.

func (*Client) ListenerResults

func (c *Client) ListenerResults(confFile, crc string) ([]base.ClientReportRspItem, error)

ListenerResults gets the listener results from the server.

func (*Client) MetaGet

func (c *Client) MetaGet(url string) ([]string, error)

MetaGet gets the config servers address from the meta server.

func (*Client) Polling

func (c *Client) Polling(configServer string) error

Polling polling the specified addr.

func (*Client) PostConf

func (c *Client) PostConf(confFile, raw, clientIps string) (string, error)

PostConf posts the conf to the server with clientIps (blank/comma separated IP addresses or all) returns crc and error info.

func (*Client) ReadConfig

func (c *Client) ReadConfig(namespace string, wait bool) <-chan bool

ReadConfig reads the config related to namespace.

type MetaRsp

type MetaRsp struct {
	AppName     string `json:"appName"`
	InstanceID  string `json:"instanceId"`
	HomepageURL string `json:"homepageUrl"`
}

MetaRsp defines the meta response structure of apollo meta service.

Jump to

Keyboard shortcuts

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