Documentation ¶
Index ¶
Constants ¶
View Source
const ( MAX_WIDTH = 1920 MAX_HEIGHT = 1920 )
View Source
const ( DEFAULT_CACHE_NAME = "mycache" DEFAULT_LOCAL_CACHE_SIZE = 64 << 20 DEFAULT_ETCD_ENDPOINTS = "http://127.0.0.1:2379" DEFAULT_CACHE_PORT = 0 DEFAULT_SERVICE_PORT = 0 )
Variables ¶
View Source
var ( ErrWrongKey = errors.New("Wrong key format") ErrWrongSizeParams = errors.New("Size parameter is wrong") )
Functions ¶
Types ¶
type CacheManager ¶
type CacheManager struct {
// contains filtered or unexported fields
}
func (*CacheManager) Join ¶
func (cm *CacheManager) Join(sr *ServiceRegistry) error
func (*CacheManager) Leave ¶
func (cm *CacheManager) Leave()
type Downloader ¶
type Downloader struct { CacheDir string // contains filtered or unexported fields }
func NewDownloader ¶
func NewDownloader(cacheDir string) Downloader
type ServiceRegistry ¶
type ServiceRegistry struct {
// contains filtered or unexported fields
}
func NewServiceRegistry ¶
func NewServiceRegistry(name string, endpoints []string) (*ServiceRegistry, error)
func (*ServiceRegistry) GetNodes ¶
func (s *ServiceRegistry) GetNodes() ([]Node, error)
func (*ServiceRegistry) Register ¶
func (s *ServiceRegistry) Register(name string, _url string) error
func (*ServiceRegistry) Unregister ¶
func (s *ServiceRegistry) Unregister(name string) error
func (*ServiceRegistry) Watch ¶
func (s *ServiceRegistry) Watch(watcher Watcher)
Click to show internal directories.
Click to hide internal directories.