channels

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(scheme string, factory Factory)

RegisterFactory registers a new Factory

Types

type Channel

type Channel interface {
	Send(key, data string) error
	Recv(key string) (data string, err error)
}

A Channel facilitates signaling.

func Get

func Get(addr string) (Channel, error)

Get returns a channel for the given address

func Must

func Must(ch Channel, err error) Channel

Must panics if there's an error

type Factory

type Factory = func(addr string) (Channel, error)

A Factory returns a Channel from an address

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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