service

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 15 Imported by: 0

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
	TChannelFactory TChannelFactory
	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(ch *tchannel.Channel) (*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 starts the service
	Start(thriftService []thrift.TChanServer)

	// Stop stops the service
	Stop()

	GetLogger() bark.Logger

	GetMetricsClient() metrics.Client

	GetClientFactory() client.Factory

	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.

type TChannelFactory

type TChannelFactory interface {
	// CreateChannel creates and returns the (tchannel, thriftServer) tuple
	// The implementation typically also starts the server as part of this call
	CreateChannel(sName string, thriftServices []thrift.TChanServer) (*tchannel.Channel, *thrift.Server)
}

TChannelFactory creates a TChannel and Thrift server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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