-
Notifications
You must be signed in to change notification settings - Fork 249
/
apollo_client_interface.go
29 lines (26 loc) · 1.05 KB
/
apollo_client_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package mock
import (
"container/list"
"github.com/apolloconfig/agollo/v4/agcache"
"github.com/apolloconfig/agollo/v4/storage"
)
//go:generate mockgen -destination mock_apollo_client_interface.go -package mock -source=./apollo_client_interface.go
//Client apollo 客户端接口
type Client interface {
GetConfig(namespace string) *storage.Config
GetConfigAndInit(namespace string) *storage.Config
GetConfigCache(namespace string) agcache.CacheInterface
GetDefaultConfigCache() agcache.CacheInterface
GetApolloConfigCache() agcache.CacheInterface
GetValue(key string) string
GetStringValue(key string, defaultValue string) string
GetIntValue(key string, defaultValue int) int
GetFloatValue(key string, defaultValue float64) float64
GetBoolValue(key string, defaultValue bool) bool
GetStringSliceValue(key string, defaultValue []string) []string
GetIntSliceValue(key string, defaultValue []int) []int
AddChangeListener(listener storage.ChangeListener)
RemoveChangeListener(listener storage.ChangeListener)
GetChangeListeners() *list.List
UseEventDispatch()
}