Documentation
¶
Overview ¶
Package setup pkg/transport/setup/rpc.go c2-net-transport
Package setup pkg/transport/setup/visor.go c2-net-transport
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrIncorrectType = errors.New("transport was not created by skycoin or autoconnect")
ErrIncorrectType is returned when transport was not created by the setup system
Functions ¶
This section is empty.
Types ¶
type BoolResponse ¶
type BoolResponse struct {
Result bool
}
BoolResponse is a simple boolean wrapped in structure for RPC responses
type TransportGateway ¶
type TransportGateway struct {
// contains filtered or unexported fields
}
TransportGateway that exposes methods to be used via RPC
func (*TransportGateway) AddTransport ¶
func (gw *TransportGateway) AddTransport(req TransportRequest, res *TransportResponse) error
AddTransport specified by request
func (*TransportGateway) GetTransports ¶
func (gw *TransportGateway) GetTransports(_ struct{}, res *[]TransportResponse) error
GetTransports returns all transports of this node regardless of label (skycoin, automatic, user). User-labeled transports are included so the setup node's view of the visor matches the discovery/DHT view, but RemoveTransport still rejects user-labeled transports so the setup node cannot delete entries a local operator created manually.
func (*TransportGateway) RemoveTransport ¶
func (gw *TransportGateway) RemoveTransport(req UUIDRequest, res *BoolResponse) error
RemoveTransport removes all transports that match given request
type TransportListener ¶
type TransportListener struct {
// contains filtered or unexported fields
}
TransportListener provides an rpc service over dmsg to perform skycoin transport setup
func NewTransportListener ¶
func NewTransportListener(ctx context.Context, pk cipher.PubKey, tsnodes []cipher.PubKey, dmsgC *dmsg.Client, tm *transport.Manager, masterLogger *logging.MasterLogger) (*TransportListener, error)
NewTransportListener makes a TransportListener from configuration
func (*TransportListener) Serve ¶
func (ts *TransportListener) Serve(ctx context.Context)
Serve transport setup rpc to trusted nodes over dmsg
type TransportRequest ¶
TransportRequest to perform an action over RPC