util

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBroadcastChannel

func AddBroadcastChannel(id interface{}, ch chan<- []byte)

AddBroadcastChannel adds a broadcast channel

func AddMonitorChannel

func AddMonitorChannel(id interface{}, ch chan<- *service.Node)

AddMonitorChannel adds a monitor channel

func RemoveBroadcastChannel

func RemoveBroadcastChannel(id interface{})

RemoveBroadcastChannel removes a broadcast channel

func RemoveMonitorChannel

func RemoveMonitorChannel(id interface{})

RemoveMonitorChannel removes a monitor channel

func SmudgeToTamTamNode

func SmudgeToTamTamNode(node *smudge.Node) *service.Node

SmudgeToTamTamNode converts a smudge node to a TamTam node

func SmudgeToTamTamStatus

func SmudgeToTamTamStatus(s smudge.NodeStatus) service.Status

SmudgeToTamTamStatus converts a smudge node status to a TamTam status

func StatusToString

func StatusToString(s service.Status) string

StatusToString converts a TamTam status to a string

Types

type SmudgeLogger

type SmudgeLogger struct {
}

SmudgeLogger allows us to use our own logger with SmudgeLogger

func (SmudgeLogger) Log

func (s SmudgeLogger) Log(level smudge.LogLevel, a ...interface{}) (n int, err error)

Log writes a log message of a certain level to the logger

func (SmudgeLogger) Logf

func (s SmudgeLogger) Logf(level smudge.LogLevel, format string, a ...interface{}) (n int, err error)

Logf writes a log message of a certain level to the logger

Jump to

Keyboard shortcuts

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