Documentation ¶
Overview ¶
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/24
- Time: 下午3:41
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/26
- Time: 下午7:34
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/25
- Time: 下午8:44
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2020/5/20
- Time: 4:01 下午
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/18
- Time: 下午4:32
*
- @api post etcdservice. *
- User: yunshengzhu
- Date: 2019-07-24
- Time: 21:39
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/19
- Time: 上午11:08
*
- @api post etcdservice. *
- User: yunshengzhu
- Date: 2019-07-31
- Time: 15:45
*
- @api post etcdservice. *
- User: yunshengzhu
- Date: 2019-07-31
- Time: 14:36
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2022/7/23
- Time: 16:58
*
- @api post etcdv3. *
- User: yunshengzhu
- Date: 2021/12/25
- Time: 下午5:41
Index ¶
- Constants
- Variables
- func Del(etcd *Etcd, key string) (err error)
- func Get(etcd *Etcd, key string) (*mvccpb.KeyValue, error)
- func KvDel(etcd *Etcd, key string) (err error)
- func KvGet(etcd *Etcd, key string) (response *clientv3.GetResponse, err error)
- func KvPut(etcd *Etcd, key, val string) error
- func LoadConfig(etcd *Etcd, key string, fn func([]byte)) error
- func NewResolver(etcd *Etcd, service string) resolver.Builder
- func NewRpcConn(ctx context.Context, scheme, service string, opts []grpc.DialOption) (*grpc.ClientConn, error)
- func Put(etcd *Etcd, key, val string, ttl int64) error
- type Application
- type ApplicationAsc
- type ApplicationData
- type Auth
- type AuthorizedPath
- type Config
- func (c *Config) Del(key string) error
- func (c *Config) Get(key string) (ConfigData, error)
- func (c *Config) GetHistoryList(key string) ([]ConfigData, error)
- func (c *Config) GetHistoryLists(key string) ([]ConfigData, error)
- func (c *Config) Gets(key string) ([]ConfigData, error)
- func (c *Config) Set(key, val, desc string) error
- type ConfigData
- type Etcd
- type EtcdMutex
- type MonitoringApp
- type NamespaceData
- type Namespaces
- type Node
- type Resolver
- type Service
- type ServiceDiscovery
- type ServiceInfo
- type ServiceRegister
- type TlsConfig
- type User
Constants ¶
View Source
const ( BasePath = "/etcd-v3" NamespacePath = "namespace" Registry = "registry" ConfigPath = "config" KvDataPath = "kv-data" ConfigHistoryPath = "config-history" )
Variables ¶
View Source
var Namespace string
Functions ¶
func NewRpcConn ¶ added in v0.0.9
func NewRpcConn(ctx context.Context, scheme, service string, opts []grpc.DialOption) (*grpc.ClientConn, error)
Types ¶
type Application ¶ added in v0.0.17
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶ added in v0.0.17
func NewApplication(etcd *Etcd, namespace string) Application
func (*Application) Gets ¶ added in v0.0.17
func (c *Application) Gets(key string) ([]ApplicationData, error)
func (*Application) LastKey ¶ added in v0.0.17
func (c *Application) LastKey(str string) string
func (*Application) LastTwoKey ¶ added in v0.0.17
func (c *Application) LastTwoKey(str string) string
type ApplicationAsc ¶ added in v0.0.56
type ApplicationAsc []ApplicationData
func (ApplicationAsc) Len ¶ added in v0.0.56
func (I ApplicationAsc) Len() int
func (ApplicationAsc) Less ¶ added in v0.0.56
func (I ApplicationAsc) Less(i, j int) bool
func (ApplicationAsc) Swap ¶ added in v0.0.56
func (I ApplicationAsc) Swap(i, j int)
type ApplicationData ¶ added in v0.0.17
type Auth ¶ added in v0.0.22
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) AuthSetupRoot ¶ added in v0.0.22
func (*Auth) CreateUserRole ¶ added in v0.0.22
func (*Auth) DelUserRole ¶ added in v0.0.23
type AuthorizedPath ¶ added in v0.0.22
func GetAuthPaths ¶ added in v0.0.22
func GetAuthPaths(namespace string) []AuthorizedPath
type Config ¶ added in v0.0.17
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetHistoryList ¶ added in v1.0.4
func (c *Config) GetHistoryList(key string) ([]ConfigData, error)
func (*Config) GetHistoryLists ¶ added in v1.0.4
func (c *Config) GetHistoryLists(key string) ([]ConfigData, error)
type ConfigData ¶ added in v0.0.17
type Etcd ¶ added in v0.0.3
type Etcd struct {
// contains filtered or unexported fields
}
type EtcdMutex ¶
type MonitoringApp ¶ added in v0.0.70
type MonitoringApp struct {
// contains filtered or unexported fields
}
func NewMonitoringApp ¶ added in v0.0.70
func (*MonitoringApp) Watch ¶ added in v0.0.70
func (app *MonitoringApp) Watch()
type NamespaceData ¶ added in v0.0.18
type Namespaces ¶ added in v0.0.18
type Namespaces struct {
// contains filtered or unexported fields
}
func NewNamespace ¶ added in v0.0.18
func NewNamespace(etcd *Etcd) *Namespaces
func (*Namespaces) Create ¶ added in v0.0.18
func (n *Namespaces) Create(data NamespaceData) error
func (*Namespaces) Del ¶ added in v0.0.18
func (n *Namespaces) Del(namespace string) error
func (*Namespaces) Get ¶ added in v0.0.74
func (n *Namespaces) Get(namespace string) (r NamespaceData, err error)
func (*Namespaces) List ¶ added in v0.0.18
func (n *Namespaces) List() (list []NamespaceData, err error)
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Build ¶
func (r *Resolver) Build(target resolver.Target, clientConn resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(rn resolver.ResolveNowOptions)
type Service ¶ added in v0.0.3
type Service struct { ServiceInfo ServiceInfo Etcd *Etcd // contains filtered or unexported fields }
func NewService ¶ added in v0.0.3
func NewService(etcd *Etcd, info ServiceInfo) (service *Service, err error)
type ServiceDiscovery ¶ added in v0.0.3
type ServiceDiscovery struct {
// contains filtered or unexported fields
}
func NewServiceDiscovery ¶ added in v0.0.3
func NewServiceDiscovery(etcd *Etcd) (*ServiceDiscovery, error)
func (*ServiceDiscovery) DelServices ¶ added in v0.0.3
func (s *ServiceDiscovery) DelServices(key string)
func (*ServiceDiscovery) GetServices ¶ added in v0.0.3
func (s *ServiceDiscovery) GetServices() []string
func (*ServiceDiscovery) SetServices ¶ added in v0.0.3
func (s *ServiceDiscovery) SetServices(key, val string)
func (*ServiceDiscovery) WatchService ¶ added in v0.0.3
func (s *ServiceDiscovery) WatchService(prefix string) error
type ServiceInfo ¶ added in v0.0.3
type ServiceInfo struct { Name string `json:"name"` Address string `json:"address"` CreateTime time.Time `json:"createTime"` }
服务信息
type ServiceRegister ¶ added in v0.0.3
type ServiceRegister struct {
// contains filtered or unexported fields
}
func NewServiceRegister ¶ added in v0.0.3
func (*ServiceRegister) Close ¶ added in v0.0.3
func (s *ServiceRegister) Close() error
func (*ServiceRegister) ListenLeaseRespChan ¶ added in v0.0.3
func (s *ServiceRegister) ListenLeaseRespChan()
Click to show internal directories.
Click to hide internal directories.