bifrost_api

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_github_com_aperturerobotics_bifrost_daemon_api_api_proto protoreflect.FileDescriptor

Functions

func RegisterAsSRPCServer added in v0.4.0

func RegisterAsSRPCServer(s BifrostAPIServer, mux srpc.Mux)

RegisterAsSRPCServer registers a server with a SRPC 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) RegisterAsSRPCServer added in v0.4.0

func (a *API) RegisterAsSRPCServer(mux srpc.Mux)

RegisterAsSRPCServer registers the API to the SRPC 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 srpc.Client) 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"`
	// contains filtered or unexported fields
}

Config configures the API.

func (*Config) CloneGenericVT added in v0.8.3

func (m *Config) CloneGenericVT() proto.Message

func (*Config) CloneVT added in v0.8.3

func (m *Config) CloneVT() *Config

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) EqualVT added in v0.3.0

func (this *Config) EqualVT(that *Config) bool

func (*Config) GetBusConfig added in v0.1.1

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

func (*Config) MarshalToSizedBufferVT added in v0.2.0

func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Config) MarshalToVT added in v0.2.0

func (m *Config) MarshalToVT(dAtA []byte) (int, error)

func (*Config) MarshalVT added in v0.2.0

func (m *Config) MarshalVT() (dAtA []byte, err error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect added in v0.2.0

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT added in v0.2.0

func (m *Config) SizeVT() (n int)

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalVT added in v0.2.0

func (m *Config) UnmarshalVT(dAtA []byte) error

type SRPCBifrostAPIClient added in v0.4.0

type SRPCBifrostAPIClient = BifrostAPIClient

SRPCBifrostAPIClient is the bifrost daemon client interface.

type SRPCBifrostAPIServer added in v0.4.0

type SRPCBifrostAPIServer = BifrostAPIServer

SRPCBifrostAPIServer 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