client

package
v0.0.0-...-35b3a18 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppStateChangeAdded is emmited when new app is exposed
	AppStateChangeAdded = "added"
	// AppStateChangeWithdrawn is emmited when app is withdrawn
	AppStateChangeWithdrawn = "withdrawn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStateChange

type AppStateChange struct {
	App   peers.App
	State string
}

AppStateChange is emmited when app state changes

type AppStateManager

type AppStateManager interface {
	Changes() chan AppStateChange
}

AppStateManager notifies the client about the state of exposed apps

func NewStaticAppStateManager

func NewStaticAppStateManager(apps []peers.App) AppStateManager

NewStaticAppStateManager creates new AppStateManager for a static list of supported apps

type Exposer

type Exposer struct {
	Peer peers.Peer
}

Exposer exposes given apps via the peer

func NewExposer

func NewExposer(peer peers.Peer) *Exposer

NewExposer creates Exposer instances

func (*Exposer) Expose

func (e *Exposer) Expose(appManager AppStateManager) error

Expose connects to the peer and instructs it to expose the apps

Jump to

Keyboard shortcuts

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