Help us shape the future of Go! Take the 2026 Go Developer Survey

setup

package
v1.3.103 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 12 Imported by: 1

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

View Source
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

type TransportRequest struct {
	RemotePK cipher.PubKey
	Type     types.Type
}

TransportRequest to perform an action over RPC

type TransportResponse

type TransportResponse struct {
	ID     uuid.UUID
	Local  cipher.PubKey
	Remote cipher.PubKey
	Type   types.Type
}

TransportResponse specifies an existing transport to remote node

type UUIDRequest

type UUIDRequest struct {
	ID uuid.UUID
}

UUIDRequest contains id in UUID format

Jump to

Keyboard shortcuts

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