Documentation ¶
Overview ¶
Copyright 2021 Layotto Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewStore() configstores.Store
- type EtcdV3ConfigStore
- func (c *EtcdV3ConfigStore) Delete(ctx context.Context, req *configstores.DeleteRequest) error
- func (c *EtcdV3ConfigStore) Get(ctx context.Context, req *configstores.GetRequest) ([]*configstores.ConfigurationItem, error)
- func (c *EtcdV3ConfigStore) GetDefaultGroup() string
- func (c *EtcdV3ConfigStore) GetDefaultLabel() string
- func (c *EtcdV3ConfigStore) GetItemsFromAllKeys(kvs []*mvccpb.KeyValue, targetString []string) []*configstores.ConfigurationItem
- func (c *EtcdV3ConfigStore) GetPrimaryKeyWithoutTag(s string) string
- func (c *EtcdV3ConfigStore) Init(config *configstores.StoreConfig) error
- func (c *EtcdV3ConfigStore) ParseKey(appId string, req *configstores.ConfigurationItem) []string
- func (c *EtcdV3ConfigStore) Set(ctx context.Context, req *configstores.SetRequest) error
- func (c *EtcdV3ConfigStore) StopSubscribe()
- func (c *EtcdV3ConfigStore) Subscribe(req *configstores.SubscribeReq, ch chan *configstores.SubscribeResp) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStore ¶
func NewStore() configstores.Store
Types ¶
type EtcdV3ConfigStore ¶
func (*EtcdV3ConfigStore) Delete ¶
func (c *EtcdV3ConfigStore) Delete(ctx context.Context, req *configstores.DeleteRequest) error
Delete deletes configuration from configuration store.
func (*EtcdV3ConfigStore) Get ¶
func (c *EtcdV3ConfigStore) Get(ctx context.Context, req *configstores.GetRequest) ([]*configstores.ConfigurationItem, error)
Get gets configuration from configuration store.
func (*EtcdV3ConfigStore) GetDefaultGroup ¶
func (c *EtcdV3ConfigStore) GetDefaultGroup() string
func (*EtcdV3ConfigStore) GetDefaultLabel ¶
func (c *EtcdV3ConfigStore) GetDefaultLabel() string
func (*EtcdV3ConfigStore) GetItemsFromAllKeys ¶
func (c *EtcdV3ConfigStore) GetItemsFromAllKeys(kvs []*mvccpb.KeyValue, targetString []string) []*configstores.ConfigurationItem
func (*EtcdV3ConfigStore) GetPrimaryKeyWithoutTag ¶
func (c *EtcdV3ConfigStore) GetPrimaryKeyWithoutTag(s string) string
func (*EtcdV3ConfigStore) Init ¶
func (c *EtcdV3ConfigStore) Init(config *configstores.StoreConfig) error
Init init the configuration store.
func (*EtcdV3ConfigStore) ParseKey ¶
func (c *EtcdV3ConfigStore) ParseKey(appId string, req *configstores.ConfigurationItem) []string
func (*EtcdV3ConfigStore) Set ¶
func (c *EtcdV3ConfigStore) Set(ctx context.Context, req *configstores.SetRequest) error
Set saves configuration into configuration store.
func (*EtcdV3ConfigStore) StopSubscribe ¶
func (c *EtcdV3ConfigStore) StopSubscribe()
func (*EtcdV3ConfigStore) Subscribe ¶
func (c *EtcdV3ConfigStore) Subscribe(req *configstores.SubscribeReq, ch chan *configstores.SubscribeResp) error
Subscribe gets configuration from configuration store and subscribe the updates.