bifrost_api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAsDRPCServer added in v0.1.1

func RegisterAsDRPCServer(s BifrostAPIServer, mux drpc.Mux)

RegisterAsDRPCServer registers a server with a DRPC mux.

Types

type API

type API struct {
	*BusAPI
	// contains filtered or unexported fields
}

API implements the daemon API.

func NewAPI

func NewAPI(bus bus.Bus, conf *Config) (*API, error)

NewAPI constructs a new instance of the API.

func (*API) AcceptStream

AcceptStream accepts an incoming stream. Stream data is sent over the request / response streams.

func (*API) DialStream

DialStream dials a outgoing stream. Stream data is sent over the request / response streams.

func (*API) ForwardStreams

ForwardStreams forwards streams to the target multiaddress. Handles HandleMountedStream directives by contacting the target.

func (*API) GetPeerInfo

GetPeerInfo returns the peer information

func (*API) Identify

Identify loads and manages a private key identity.

func (*API) ListenStreams

ListenStreams listens for streams on the multiaddress.

func (*API) RegisterAsDRPCServer added in v0.1.1

func (a *API) RegisterAsDRPCServer(mux drpc.Mux)

RegisterAsDRPCServer registers the API to the DRPC mux.

func (*API) Subscribe

Subscribe subscribes to a pubsub channel.

TODO: move this code to pubsub/api

type BifrostAPIClient

BifrostAPIClient is the bifrost daemon client interface.

func NewBifrostAPIClient

func NewBifrostAPIClient(cc drpc.Conn) BifrostAPIClient

NewBifrostAPIClient constructs a new bifrost api client.

type BifrostAPIServer

BifrostAPIServer is the bifrost daemon server interface.

type BusAPI added in v0.1.1

type BusAPI = bus_api.API

BusAPI implements the controller bus api.

type Config

type Config struct {
	// BusConfig configures the bus api.
	BusConfig            *api.Config `protobuf:"bytes,1,opt,name=bus_config,json=busConfig,proto3" json:"bus_config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Config configures the API.

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetBusConfig added in v0.1.1

func (m *Config) GetBusConfig() *api.Config

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type DRPCBifrostAPIClient added in v0.1.2

type DRPCBifrostAPIClient = BifrostAPIClient

DRPCBifrostAPIClient is the bifrost daemon client interface.

type DRPCBifrostAPIServer added in v0.1.2

type DRPCBifrostAPIServer = BifrostAPIServer

DRPCBifrostAPIServer is the bifrost daemon server interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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