Documentation ¶
Index ¶
- Constants
- Variables
- func BatchCommit(ctx context.Context, opts []registry.PluginOp) error
- func BatchCommitWithCmp(ctx context.Context, opts []registry.PluginOp, cmp []registry.CompareOp, ...) (resp *registry.PluginResponse, err error)
- func Registry() registry.Registry
- func ReportHeartbeatCompleted(err error, start time.Time)
- func ReportScInstance()
- func Revision() int64
- func ToLeaseAsyncTaskKey(key string) string
- type AddOn
- type InstanceEventDeferHandler
- type KvStore
- func (s *KvStore) Adaptors(id discovery.Type) discovery.Adaptor
- func (s *KvStore) DependencyQueue() discovery.Adaptor
- func (s *KvStore) DependencyRule() discovery.Adaptor
- func (s *KvStore) Domain() discovery.Adaptor
- func (s *KvStore) Initialize()
- func (s *KvStore) InjectConfig(cfg *discovery.Config) *discovery.Config
- func (s *KvStore) Install(addOn AddOn) (id discovery.Type, err error)
- func (s *KvStore) Instance() discovery.Adaptor
- func (s *KvStore) KeepAlive(ctx context.Context, opts ...registry.PluginOpOption) (int64, error)
- func (s *KvStore) Lease() discovery.Adaptor
- func (s *KvStore) MustInstall(addOn AddOn) discovery.Type
- func (s *KvStore) OnCacheEvent(evt discovery.KvEvent)
- func (s *KvStore) Project() discovery.Adaptor
- func (s *KvStore) Ready() <-chan struct{}
- func (s *KvStore) Rule() discovery.Adaptor
- func (s *KvStore) RuleIndex() discovery.Adaptor
- func (s *KvStore) Run()
- func (s *KvStore) Schema() discovery.Adaptor
- func (s *KvStore) SchemaSummary() discovery.Adaptor
- func (s *KvStore) Service() discovery.Adaptor
- func (s *KvStore) ServiceAlias() discovery.Adaptor
- func (s *KvStore) ServiceIndex() discovery.Adaptor
- func (s *KvStore) ServiceTag() discovery.Adaptor
- func (s *KvStore) Stop()
- type LeaseTask
- type RegistryEngine
Constants ¶
View Source
const (
// the same as v3rpc.MaxOpsPerTxn = 128
MaxTxnNumberOneTime = 128
)
Variables ¶
View Source
var ( DOMAIN discovery.Type PROJECT discovery.Type SERVICE discovery.Type ServiceIndex discovery.Type ServiceAlias discovery.Type ServiceTag discovery.Type RULE discovery.Type RuleIndex discovery.Type DependencyRule discovery.Type DependencyQueue discovery.Type SCHEMA discovery.Type SchemaSummary discovery.Type INSTANCE discovery.Type LEASE discovery.Type )
Functions ¶
func BatchCommitWithCmp ¶
func ReportScInstance ¶
func ReportScInstance()
func ToLeaseAsyncTaskKey ¶
Types ¶
type InstanceEventDeferHandler ¶
type InstanceEventDeferHandler struct { Percent float64 // contains filtered or unexported fields }
func NewInstanceEventDeferHandler ¶
func NewInstanceEventDeferHandler() *InstanceEventDeferHandler
func (*InstanceEventDeferHandler) HandleChan ¶
func (iedh *InstanceEventDeferHandler) HandleChan() <-chan discovery.KvEvent
func (*InstanceEventDeferHandler) OnCondition ¶
func (iedh *InstanceEventDeferHandler) OnCondition(cache discovery.CacheReader, evts []discovery.KvEvent) bool
func (*InstanceEventDeferHandler) Reset ¶
func (iedh *InstanceEventDeferHandler) Reset() bool
type KvStore ¶
func (*KvStore) DependencyQueue ¶
func (*KvStore) DependencyRule ¶
func (*KvStore) Initialize ¶
func (s *KvStore) Initialize()
func (*KvStore) InjectConfig ¶
func (*KvStore) KeepAlive ¶
KeepAlive will always return ok when registry is unavailable unless the registry response is LeaseNotFound
func (*KvStore) OnCacheEvent ¶
func (*KvStore) SchemaSummary ¶
func (*KvStore) ServiceAlias ¶
func (*KvStore) ServiceIndex ¶
func (*KvStore) ServiceTag ¶
type LeaseTask ¶
type LeaseTask struct { Client registry.Registry LeaseID int64 TTL int64 // contains filtered or unexported fields }
func NewLeaseAsyncTask ¶
func (*LeaseTask) ReceiveTime ¶
type RegistryEngine ¶
func GetRegistryEngine ¶
func GetRegistryEngine() *RegistryEngine
func NewEngine ¶
func NewEngine() (*RegistryEngine, error)
func (*RegistryEngine) Start ¶
func (s *RegistryEngine) Start() error
func (*RegistryEngine) Stop ¶
func (s *RegistryEngine) Stop()
Click to show internal directories.
Click to hide internal directories.