peergrouper

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitiateMongoServer

func InitiateMongoServer(p InitiateMongoParams) error

InitiateMongoServer checks for an existing mongo configuration. If no existing configuration is found one is created using Initiate.

func New

func New(st *state.State, clock clock.Clock, supportsSpaces bool, hub Hub) (worker.Worker, error)

New returns a new worker that maintains the mongo replica set with respect to the given state.

Types

type Hub

type Hub interface {
	Publish(topic pubsub.Topic, data interface{}) (<-chan struct{}, error)
}

Hub defines the only method of the apiserver centralhub that the peer grouper uses.

type InitiateMongoParams

type InitiateMongoParams struct {
	// DialInfo specifies how to connect to the mongo server.
	DialInfo *mgo.DialInfo

	// MemberHostPort provides the address to use for
	// the first replica set member.
	MemberHostPort string

	// User holds the user to log as in to the mongo server.
	// If it is empty, no login will take place.
	User     string
	Password string
}

InitiateMongoParams holds parameters for the MaybeInitiateMongo call.

type SpaceReader

type SpaceReader interface {
	Name() string
}

Jump to

Keyboard shortcuts

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