hbtype

package
v0.0.0-...-0a8b275 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package hbtype provides types for hb drivers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDStopper

type IDStopper interface {
	ID() string
	Stop() error
}

IDStopper is the interface to stop a hb driver

type Msg

type Msg struct {
	Kind      string                   `json:"kind"`
	Compat    uint64                   `json:"compat"`
	Gen       map[string]uint64        `json:"gen"`
	UpdatedAt time.Time                `json:"updated_at"`
	Ping      node.Monitor             `json:"monitor,omitempty"`
	Events    map[string][]event.Event `json:"events,omitempty"`
	NodeData  node.Node                `json:"node_data,omitempty"`
	Nodename  string                   `json:"nodename"`
}

Msg struct holds all kinds of hb message

type Receiver

type Receiver interface {
	IDStopper
	Start(cmdC chan<- interface{}, msgC chan<- *Msg) error
}

Receiver is the interface that wraps the basic methods for hb driver to receive hb messages

type Transmitter

type Transmitter interface {
	IDStopper
	Start(cmdC chan<- interface{}, dataC <-chan []byte) error
}

Transmitter is the interface that wraps the basic methods for hb driver to send hb messages

Jump to

Keyboard shortcuts

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