apollo

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectTimeout = 5 * time.Second
	RetryInterval  = 5 * time.Second
	NofityTimeout  = 65 * time.Second
)
View Source
var ErrInvalidHttpStatus = errors.New("invalid http status")

Functions

func ListFormatFunc

func ListFormatFunc(es []error) string

func NewMutliError

func NewMutliError() *multierror.Error

Types

type CallBack

type CallBack struct {
	SuccCallBack      func([]byte) (interface{}, error)
	NotModifyCallBack func() error
}

type Config

type Config struct {
	ConnConfig
	Configurations map[string]string `json:"configurations"`
}

type ConfigCenter

type ConfigCenter struct {
	Host     Resolver
	AppId    string `json:"appId"`
	Cluster  string `json:"cluster"`
	ClientIp string `json:"-"`
}

func (*ConfigCenter) PullNotify

func (cc *ConfigCenter) PullNotify(notifications string) ([]*NotifyMsg, error)

func (*ConfigCenter) SyncConfig

func (cc *ConfigCenter) SyncConfig(namespaceName, releaseKey string, notificationId int64) (ret *Config, err error)

type ConnConfig

type ConnConfig struct {
	AppId         string `json:"appId"`
	Cluster       string `json:"cluster"`
	NamespaceName string `json:"namespaceName"`
	ReleaseKey    string `json:"releaseKey"`
}

type Message

type Message struct {
	Details map[string]interface{} `json:"details"`
}

type NotifyMsg

type NotifyMsg struct {
	NotificationId int64  `json:"notificationId"`
	NamespaceName  string `json:"namespaceName"`
}

type Resolver

type Resolver interface {
	// contains filtered or unexported methods
}

func NewSingleHostResolver

func NewSingleHostResolver(host string) Resolver

Jump to

Keyboard shortcuts

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