zktestserver

package
v2.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t *testing.T, cells []string) topo.Server

New returns a new TestServer (with the required paths created)

Types

type TestServer

type TestServer struct {
	topo.Impl

	HookLockSrvShardForAction func()
	// contains filtered or unexported fields
}

TestServer is a proxy for a real implementation of topo.Server that provides hooks for testing.

func (*TestServer) GetKnownCells

func (s *TestServer) GetKnownCells(ctx context.Context) ([]string, error)

GetKnownCells is part of topo.Server interface

func (*TestServer) LockSrvShardForAction

func (s *TestServer) LockSrvShardForAction(ctx context.Context, cell, keyspace, shard, contents string) (string, error)

LockSrvShardForAction should override the function defined by the underlying topo.Server.

Jump to

Keyboard shortcuts

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