hbucast

package
v1.0.0-alpha1.0...-2e0dbe4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package hbucast implement a hb unicast driver

Example:

msgC := make(chan *hbtype.Msg) // a global *hbtype.Msg chan for received Msg
n := clusterhb.New()
registeredDataC := make([]chan []byte, 0) // list send data chan where tx can send data
for _, h := range n.Hbs() {
	h.Configure(ctx) // configure tx and rx
	if err := h.Rx().Start(data.Cmd(), msgC); err != nil {
		return err
	}
	localDataC := make(chan []byte) // []byte chan dedicated to this tx
	if err := h.Tx().Start(data.Cmd(), localDataC); err != nil {
		return err
	}
	registeredDataC = append(registeredDataC, localDataC)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() hbcfg.Confer

Types

type T

type T struct {
	hbcfg.T
}

func (*T) Configure

func (t *T) Configure(ctx context.Context)

Configure implements the Configure function of Confer interface for T

Jump to

Keyboard shortcuts

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