coordinatormanager

package
v0.0.0-...-5b6cbe3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCoordinatorManager is the root for the errors
	ErrCoordinatorManager = errors.NewClass("CoordinatorManager Error")

	// ErrArg describes the family of calling errors
	ErrArg = ErrCoordinatorManager.NewClass("Argument error")

	// ErrRuntime describes the family of system errors
	ErrRuntime = ErrCoordinatorManager.NewClass("Runtime error")

	// ErrInvalid is used for invalid arguments
	ErrInvalid = ErrArg.New("Invalid argument")

	// ErrNotFound indicates that the coordinator ask by key is not available
	ErrNotFound = ErrRuntime.New("Coordinator not found")

	// ErrClosed indicates the coordinator manager is closed
	ErrClosed = ErrRuntime.New("Coordinator Manager is closed")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Peer     *peer.Peer        `validate:"required"`
	Selector selector.Selector `validate:"required"`
}

Config includes the execution paramers for the CoordinatorManager

type CoordinatorManager

type CoordinatorManager struct {
	// contains filtered or unexported fields
}

CoordinatorManager provides clustered access to the Coordinators

func New

func New(config Config) (*CoordinatorManager, error)

New instantiates a new CoordinatorManager

func (*CoordinatorManager) Close

func (nm *CoordinatorManager) Close() error

Close shutdowns all the coordinators of the namespace

func (*CoordinatorManager) Partition

func (nm *CoordinatorManager) Partition(key string) (coordinator.Coordinator, error)

Partition returns the Coordinator resposinble for the key

Jump to

Keyboard shortcuts

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