github.com/unionj-cloud/go-doudou@v1.3.8-0.20221011095552-0088008e5b31/framework/configmgr/mock/apollo_client_interface.go (about)

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