services

package
v0.0.0-...-abd5428 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStream

func NewStream() *health.Stream

Types

type Connections

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

func NewConnections

func NewConnections(stream *health.Stream, dbConn *dbr.Connection, redisClient *redis.Client) *Connections

func NewConnectionsFromConfig

func NewConnectionsFromConfig(conf cfg.ServiceConfig) (*Connections, error)

func (Connections) DB

func (c Connections) DB() *dbr.Connection

func (Connections) Redis

func (c Connections) Redis() *redis.Client

func (Connections) Stream

func (c Connections) Stream() *health.Stream

type FanOutService

type FanOutService []Service

FanOutService takes in items and sends them to multiple backend Services

func (FanOutService) Add

func (fos FanOutService) Add(i Ingestable) (err error)

Add takes in an Ingestable and sends it to all underlying backends

type Ingestable

type Ingestable interface {
	ID() ids.ID
	ChainID() ids.ID
	Body() []byte
	Timestamp() uint64
}

type Service

type Service interface {
	Add(Ingestable) error
}

Service takes in Ingestables and adds them to the services backend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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