pulse

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package pulse provides ev cluster-management service based on pubsub.

Index

Constants

View Source
const DefaultTTL = time.Second * 10

Variables

This section is empty.

Functions

func NewValidator

func NewValidator(rt RoutingTable) pubsub.ValidatorEx

Types

type Heartbeat

type Heartbeat struct{ api.Heartbeat }

func NewHeartbeat

func NewHeartbeat() Heartbeat

func (*Heartbeat) Bind

func (h *Heartbeat) Bind(msg *pubsub.Message) (err error)

func (Heartbeat) Meta

func (h Heartbeat) Meta() (routing.Meta, error)

func (*Heartbeat) ReadMessage

func (h *Heartbeat) ReadMessage(m *capnp.Message) (err error)

func (Heartbeat) Server

func (h Heartbeat) Server() routing.ID

func (Heartbeat) SetMeta

func (h Heartbeat) SetMeta(fields []routing.MetaField) error

func (Heartbeat) SetServer

func (h Heartbeat) SetServer(id routing.ID)

func (Heartbeat) SetTTL

func (h Heartbeat) SetTTL(d time.Duration)

func (Heartbeat) TTL

func (h Heartbeat) TTL() (d time.Duration)

type Preparer

type Preparer interface {
	Prepare(Heartbeat) error
}

type RoutingTable

type RoutingTable interface {
	Upsert(routing.Record) bool
}

Directories

Path Synopsis
Package test_pulse is a generated GoMock package.
Package test_pulse is a generated GoMock package.

Jump to

Keyboard shortcuts

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