cache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// selector每DefaultTTL分钟通过tick函数清空cache或者get函数去清空某个service的cache,
	// 以全量获取某个service的所有providers
	DefaultTTL = 10 * time.Minute
)

Functions

func NewSelector

func NewSelector(opts ...selector.Option) selector.Selector

selector主要有两个接口,对外接口Select用于获取地址,select调用get,get调用cp; 对内接口run调用watch,watch则调用update,update调用set,以用于接收add/del service url.

而Close则是发出stop信号,停掉watch,清算破产

register自身主要向selector暴露了watch功能

Types

This section is empty.

Jump to

Keyboard shortcuts

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