apiclient

package
v0.0.0-...-f3cb915 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ABORTED          = ping_state(0)
	RESPONDED        = ping_state(1)
	CLOSED_BY_KERNEL = ping_state(2)
	TIMEOUT          = ping_state(3)
	INTERNAL_ERROR   = ping_state(4)
)

Definiert alle verfügbaren Ping Vorgänge

View Source
const (
	PING_PROTOCOL uint8 = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

Stellt eine API Verbindung dar

func LoadAPI

func LoadAPI() (*APIClient, error)

Erstellt eine neue API

func (*APIClient) Close

func (obj *APIClient) Close()

Schließt die Verbindung

func (*APIClient) FetchAllRelays

func (obj *APIClient) FetchAllRelays() ([]ApiRelayEntry, error)

Ruft alle Vefügbaren Relays ab

func (*APIClient) PingAddress

func (obj *APIClient) PingAddress(adr *btcec.PublicKey, timeout uint16) (int64, error)

Wird verwendet um einen Ping vorgang durchzuführen

type ApiRelayConnection

type ApiRelayConnection struct {
	Id              string
	Protocol        string
	SessionPkey     string
	InboundOutbound uint8
	TxBytes         uint64
	RxBytes         uint64
	Ping            uint64
}

type ApiRelayEntry

type ApiRelayEntry struct {
	Id                string
	IsConnected       bool
	PublicKey         string
	IsTrusted         bool
	TotalConnections  uint64
	TotalBytesSend    uint64
	TotalBytesRecived uint64
	PingMS            uint64
	BandwithKBs       uint64
	Connections       []ApiRelayConnection
}

type CommandArgs

type CommandArgs struct {
	Parms  [][]byte
	Method string
	Id     uint8
}

type EmptyArg

type EmptyArg struct{}

Jump to

Keyboard shortcuts

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