Documentation
¶
Index ¶
- type ClientArgs
- func (a *ClientArgs) BuildBifrostCommand() *cli.Command
- func (a *ClientArgs) BuildClient() (bifrost_api.BifrostAPIClient, error)
- func (a *ClientArgs) BuildCommands() []*cli.Command
- func (a *ClientArgs) BuildFlags() []cli.Flag
- func (a *ClientArgs) GetContext() context.Context
- func (a *ClientArgs) LoadOrGenerateIdentifyKey() ([]byte, crypto.PrivKey, error)
- func (a *ClientArgs) ParseRemotePeerIdsCsv() []string
- func (a *ClientArgs) RunAccept(*cli.Context) error
- func (a *ClientArgs) RunDial(*cli.Context) error
- func (a *ClientArgs) RunForwarding(_ *cli.Context) error
- func (a *ClientArgs) RunIdentifyController(_ *cli.Context) error
- func (a *ClientArgs) RunListen(*cli.Context) error
- func (a *ClientArgs) RunPeerInfo(_ *cli.Context) error
- func (a *ClientArgs) RunSubscribe(_ *cli.Context) error
- func (a *ClientArgs) SetClient(client bifrost_api.BifrostAPIClient)
- func (a *ClientArgs) SetContext(c context.Context)
- type DaemonArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientArgs ¶
type ClientArgs struct {
// DialConf is the dialing configuration.
DialConf stream_api_dial.Config
// ForwardingConf is the forwarding configuration.
ForwardingConf stream_forwarding.Config
// IdentifyConf is the identify configuration
IdentifyConf peer_controller.Config
// SubscribeConf is the configuration for the publish or subscribe call.
SubscribeConf pubsub_api.SubscribeRequest
// AcceptConf is the accept configuration.
AcceptConf stream_api_accept.Config
// ListeningConf is the listening configuration.
ListeningConf stream_listening.Config
// CbusConf is the controller-bus configuration.
CbusConf cbus_cli.ClientArgs
// DialAddr is the address to dial.
DialAddr string
// IdentifyKeyPath is the path to the key to read.
IdentifyKeyPath string
// IdentifyGenKey indicates we should generate the key if it doesn't exist.
IdentifyGenKey bool
// RemotePeerIdsCsv are the set of remote peer IDs to connect to.
RemotePeerIdsCsv string
// contains filtered or unexported fields
}
ClientArgs contains the client arguments and functions.
func (*ClientArgs) BuildBifrostCommand ¶
func (a *ClientArgs) BuildBifrostCommand() *cli.Command
BuildBifrostCommand returns the controller-bus sub-command set.
func (*ClientArgs) BuildClient ¶
func (a *ClientArgs) BuildClient() (bifrost_api.BifrostAPIClient, error)
BuildClient builds the client or returns it if it has been set.
func (*ClientArgs) BuildCommands ¶
func (a *ClientArgs) BuildCommands() []*cli.Command
BuildCommands attaches the commands.
func (*ClientArgs) BuildFlags ¶
func (a *ClientArgs) BuildFlags() []cli.Flag
BuildFlags attaches the flags to a flag set.
func (*ClientArgs) GetContext ¶
func (a *ClientArgs) GetContext() context.Context
GetContext returns the context.
func (*ClientArgs) LoadOrGenerateIdentifyKey ¶
func (a *ClientArgs) LoadOrGenerateIdentifyKey() ([]byte, crypto.PrivKey, error)
LoadOrGenerateIdentifyKey loads or generates the IdentifyKeyPath.
func (*ClientArgs) ParseRemotePeerIdsCsv ¶
func (a *ClientArgs) ParseRemotePeerIdsCsv() []string
ParseRemotePeerIdsCsv parses the RemotePeerIdsCsv field.
func (*ClientArgs) RunAccept ¶
func (a *ClientArgs) RunAccept(*cli.Context) error
RunAccept runs the accept command.
func (*ClientArgs) RunDial ¶
func (a *ClientArgs) RunDial(*cli.Context) error
RunDial runs the dial command.
func (*ClientArgs) RunForwarding ¶
func (a *ClientArgs) RunForwarding(_ *cli.Context) error
RunForwarding runs the forwarding command.
func (*ClientArgs) RunIdentifyController ¶
func (a *ClientArgs) RunIdentifyController(_ *cli.Context) error
RunIdentifyController runs an identify controller.
func (*ClientArgs) RunListen ¶
func (a *ClientArgs) RunListen(*cli.Context) error
RunListen runs the listen command.
func (*ClientArgs) RunPeerInfo ¶
func (a *ClientArgs) RunPeerInfo(_ *cli.Context) error
RunPeerInfo runs the peer information command.
func (*ClientArgs) RunSubscribe ¶
func (a *ClientArgs) RunSubscribe(_ *cli.Context) error
RunSubscribe runs the subscription command.
func (*ClientArgs) SetClient ¶
func (a *ClientArgs) SetClient(client bifrost_api.BifrostAPIClient)
SetClient sets the client instance.
func (*ClientArgs) SetContext ¶
func (a *ClientArgs) SetContext(c context.Context)
SetContext sets the context.
type DaemonArgs ¶
type DaemonArgs struct {
WebsocketListen string
UDPListen string
HoldOpenLinks bool
Pubsub string
// EstablishPeers is a list of peers to establish
// peer-id comma separated
EstablishPeers cli.StringSlice
// UDPPeers is a static peer list
// peer-id@address
UDPPeers cli.StringSlice
// WebsocketPeers is a static peer list
// peer-id@address
WebsocketPeers cli.StringSlice
}
DaemonArgs contains common flags for bifrost-powered daemons.
func (*DaemonArgs) ApplyFactories ¶
func (a *DaemonArgs) ApplyFactories(b bus.Bus, sr *static.Resolver)
ApplyFactories applies any extra factories necessary on top of the core set.
func (*DaemonArgs) ApplyToConfigSet ¶
func (a *DaemonArgs) ApplyToConfigSet(confSet configset.ConfigSet, overwrite bool) error
ApplyToConfigSet applies controller configurations to a config set. Map is from string descriptor to config object.
func (*DaemonArgs) BuildFlags ¶
func (a *DaemonArgs) BuildFlags() []cli.Flag
BuildFlags attaches the flags to a flag set.