store

package
v5.0.3-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(conf option.Config) (*Manager, error)

NewManager create a manager

func (*Manager) AddSource

func (m *Manager) AddSource(key string, object interface{}) error

AddSource 添加资源

func (*Manager) DeleteSource

func (m *Manager) DeleteSource(key string, dir bool) error

DeleteSource 删除资源

func (*Manager) GetDomainKey

func (m *Manager) GetDomainKey(tenantID, serviceID, domainID string) string

GetDomainKey get domain key

func (*Manager) GetDomainList

func (m *Manager) GetDomainList(key string) ([]interface{}, error)

GetDomainList 获取资源列表

func (*Manager) GetSource

func (m *Manager) GetSource(key string, object interface{}) error

GetSource 获取资源

func (*Manager) GetSourceList

func (m *Manager) GetSourceList(key, sourceType string) ([]interface{}, error)

GetSourceList 获取资源列表 使用反射方式创建对象 性能远低于直接创建对象

func (*Manager) GetV3Client

func (m *Manager) GetV3Client() *clientv3.Client

GetV3Client v3API

func (*Manager) New

func (m *Manager) New(sourceName string) (c interface{}, err error)

New 创建资源实体

func (*Manager) Register

func (m *Manager) Register(sourceName string, source interface{})

Register 注册资源类型

func (*Manager) UpdateSource

func (m *Manager) UpdateSource(key string, object interface{}) error

UpdateSource 更新资源

Jump to

Keyboard shortcuts

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