channel

package
v0.0.0-...-d0dd730 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID   int
	PK   string
	Seed string
}

Channel represents one channel

type Configurator

type Configurator struct {
	DB *db.DB

	Horizon *horizon.Client
	// contains filtered or unexported fields
}

Configurator is holding the configuration for the channel manager

type Manager

type Manager struct {
	*Configurator
}

Manager is used for handling the channels

func NewChanneler

func NewChanneler(DB *db.DB, cnf *config.Config) *Manager

NewChanneler initialises the channel manager

func (*Manager) GetChannel

func (mg *Manager) GetChannel(DistPK string, PreSignerSeed string, PostSignerSeed string) (*Channel, error)

GetChannel returns a free channel from the channel-pool

func (*Manager) ReleaseChannel

func (mg *Manager) ReleaseChannel(ChannelPK string) error

ReleaseChannel fill release the channel in the database

Jump to

Keyboard shortcuts

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