Documentation ¶
Index ¶
- Variables
- func CheckConfigSchema(config string, schema string) (bool, error)
- func EndMconfig() func()
- func GetConfigFromCache(key Appkey, filters *sdk.ConfigFilters) ([]*sdk.Config, error)
- func GetConfigFromStore(key Appkey, filters *sdk.ConfigFilters) ([]*sdk.Config, error)
- func InitMconfig(mconfig *MConfig) func()
- func InitStore(store_type, store_address string)
- func RegisterStorePlugin(name string, init func(address string) (AppConfigStore, error))
- type AppConfigStore
- type AppConfigs
- type AppConfigsJSONStr
- type AppConfigsMap
- type Appkey
- type Client
- type ClientChanMap
- type ClientId
- type Config
- type ConfigEvent
- type Configs
- type ConfigsMap
- type EventType
- type MConfig
- type MConfigCLI
- func (M *MConfigCLI) DeleteMconfigApp(ctx context.Context, request *cli.DeleteMconfigAppRequest) (*cli.DeleteMconfigAppResponse, error)
- func (M *MConfigCLI) DeleteMconfigConfig(ctx context.Context, request *cli.DeleteMconfigConfigRequest) (*cli.DeleteMconfigConfigResponse, error)
- func (M *MConfigCLI) InitMconfigApp(ctx context.Context, request *cli.InitMconfigAppRequest) (*cli.InitMconfigAppResponse, error)
- func (M *MConfigCLI) PutMconfigConfig(ctx context.Context, request *cli.PutMconfigRequest) (*cli.PutMconfigResponse, error)
- func (M *MConfigCLI) UpdateMconfigApp(ctx context.Context, request *cli.UpdateMconfigAppRequest) (*cli.UpdateMconfigAppResponse, error)
- type MConfigSDK
- type MconfigCache
- type StorePlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error_RepeateRegisterStore ... Error_RepeateRegisterStore = errors.New("RepeateRegisterStore") // Error_AppConfigNotFound ... Error_AppConfigNotFound = errors.New("AppConfigNotFound") // Error_AppConfigByFilterNotFound ... Error_AppConfigByFilterNotFound = errors.New("AppConfigByFilterNotFound") // Error_ParserAppConfigFail ... Error_ParserAppConfigFail = errors.New("ParserAppConfigFail") )
View Source
var ( // Cancel ... Cancel context.CancelFunc )
Functions ¶
func GetConfigFromCache ¶
GetConfigFromCache ...
func GetConfigFromStore ¶
GetConfigFromStore ...
func RegisterStorePlugin ¶
func RegisterStorePlugin(name string, init func(address string) (AppConfigStore, error))
RegisterStorePlugin ...
Types ¶
type AppConfigStore ¶
type AppConfigStore interface { GetAppConfigs(key string) (AppConfigsJSONStr, int64, error) PutAppConfigs(key string, value AppConfigsJSONStr) error WatchAppConfigs(key string, rev int64, ctx context.Context) (chan *ConfigEvent, error) WatchAppConfigsWithPrefix(ctx context.Context) (chan *ConfigEvent, error) }
AppConfigStore ...
type AppConfigsMap ¶
type AppConfigsMap struct { AppConfigs // contains filtered or unexported fields }
AppConfigsMap ...
type ClientChanMap ¶
ClientChanMap ...
func (*ClientChanMap) AddClient ¶
func (ch *ClientChanMap) AddClient(clientId ClientId, appid Appkey, clientMsgChan chan interface{})
AddClient ...
func (*ClientChanMap) GetClientsChan ¶
func (ch *ClientChanMap) GetClientsChan(appid Appkey) []chan interface{}
GetClientsChan ...
func (*ClientChanMap) RemoveClient ¶
func (ch *ClientChanMap) RemoveClient(clientId ClientId, appid Appkey)
RemoveClient ...
type Config ¶
type Config struct { Schema string `json:"schema"` Config string `json:"config"` CreateTime int64 `json:"create_time"` UpdateTime int64 `json:"update_time"` }
Config ...
type ConfigEvent ¶
type ConfigEvent struct { Key Appkey Value AppConfigsJSONStr EventType EventType }
ConfigEvent ...
type Configs ¶
type Configs struct { Configs ConfigsMap `json:"configs"` Desc string `json:"desc"` CreateTime int64 `json:"create_time"` UpdateTime int64 `json:"update_time"` ABFilters map[string]string `json:"ABFilters"` }
Configs ...
type ConfigsMap ¶
type ConfigsMap struct { Entry map[string]*Config `json:"entry"` // contains filtered or unexported fields }
ConfigsMap ...
type EventType ¶
type EventType int
EventType ...
var Event_Delete EventType = 1
Event_Delete ...
var Event_Update EventType = 0
Event_Update ...
type MConfig ¶
type MConfig struct { Namspace *string RegistryAddress *string RegistryType *string StoreAddress *string StoreType *string ServerIp *string ServerPort *int }
MConfig ...
type MConfigCLI ¶
type MConfigCLI struct { }
MConfigCLI ...
func (*MConfigCLI) DeleteMconfigApp ¶
func (M *MConfigCLI) DeleteMconfigApp(ctx context.Context, request *cli.DeleteMconfigAppRequest) (*cli.DeleteMconfigAppResponse, error)
DeleteMconfigApp ...
func (*MConfigCLI) DeleteMconfigConfig ¶
func (M *MConfigCLI) DeleteMconfigConfig(ctx context.Context, request *cli.DeleteMconfigConfigRequest) (*cli.DeleteMconfigConfigResponse, error)
DeleteMconfigConfig ...
func (*MConfigCLI) InitMconfigApp ¶
func (M *MConfigCLI) InitMconfigApp(ctx context.Context, request *cli.InitMconfigAppRequest) (*cli.InitMconfigAppResponse, error)
InitMconfigApp ...
func (*MConfigCLI) PutMconfigConfig ¶
func (M *MConfigCLI) PutMconfigConfig(ctx context.Context, request *cli.PutMconfigRequest) (*cli.PutMconfigResponse, error)
PutMconfigConfig ...
func (*MConfigCLI) UpdateMconfigApp ¶
func (M *MConfigCLI) UpdateMconfigApp(ctx context.Context, request *cli.UpdateMconfigAppRequest) (*cli.UpdateMconfigAppResponse, error)
UpdateMconfigApp ...
type MConfigSDK ¶
type MConfigSDK struct { }
MConfigSDK ...
func (*MConfigSDK) GetVStream ¶
func (m *MConfigSDK) GetVStream(stream sdk.MConfig_GetVStreamServer) error
GetVStream ...
type MconfigCache ¶
MconfigCache ...
type StorePlugin ¶
type StorePlugin struct { Name string Init func(address string) (AppConfigStore, error) }
StorePlugin ...
func NewStorePlugin ¶
func NewStorePlugin(name string, init func(address string) (AppConfigStore, error)) *StorePlugin
NewStorePlugin ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.