zk

package
Version: v0.0.0-...-4cda234 Latest Latest
Warning

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

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

Documentation

Overview

Package zk encapsulates our interactions with ZooKeeper.

Index

Constants

View Source
const (
	// Meta is a ResourceName that indicates that the location of the Meta
	// table is what will be fetched
	Meta = ResourceName("/meta-region-server")

	// Master is a ResourceName that indicates that the location of the Master
	// server is what will be fetched
	Master = ResourceName("/master")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	LocateResource(ResourceName) (string, error)
}

Client is an interface of client that retrieves meta infomation from zookeeper

func NewClient

func NewClient(zkquorum string, st time.Duration) Client

NewClient establishes connection to zookeeper and returns the client

type ResourceName

type ResourceName string

ResourceName is a type alias that is used to represent different resources in ZooKeeper

func (ResourceName) Prepend

func (r ResourceName) Prepend(prefix string) ResourceName

Prepend creates a new ResourceName with prefix prepended to the former ResourceName.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL