service

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: MIT Imports: 13 Imported by: 13 modules, 19 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapParams

type BootstrapParams struct {
	Name            string
	Logger          bark.Logger
	MetricScope     tally.Scope
	RingpopFactory  RingpopFactory
	RPCFactory      common.RPCFactory
	CassandraConfig config.Cassandra
}

BootstrapParams holds the set of parameters needed to bootstrap a service

type RingpopFactory

type RingpopFactory interface {
	// CreateRingpop vends a bootstrapped ringpop object
	CreateRingpop(d *yarpc.Dispatcher) (*ringpop.Ringpop, error)
}

RingpopFactory provides a bootstrapped ringpop

type Service

type Service interface {
	// GetHostName returns the name of host running the service
	GetHostName() string

	// Start the service
	Start()

	// Stop stops the service
	Stop()

	GetLogger() bark.Logger

	GetMetricsClient() metrics.Client

	GetClientFactory() client.Factory

	GetDispatcher() *yarpc.Dispatcher

	GetMembershipMonitor() membership.Monitor

	GetHostInfo() *membership.HostInfo
}

Service is the interface which must be implemented by all the services

func New

func New(params *BootstrapParams) Service

New instantiates a Service Instance TODO: have a better name for Service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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