Documentation
¶
Index ¶
- Constants
- func DeserializeConfig(reader *ByteReader, cfg *Config)
- func DeserializeDevice(reader *ByteReader, dev *Device)
- func DeserializeExchange(reader *ByteReader, exchange *Exchange)
- func DeserializeInterface(reader *ByteReader, iface *Interface)
- func DeserializeLink(reader *ByteReader, link *Link)
- func DeserializeLocation(reader *ByteReader, loc *Location)
- func DeserializeMulticastGroup(reader *ByteReader, multicastgroup *MulticastGroup)
- func DeserializeUser(reader *ByteReader, user *User)
- type AccountType
- type ByteReader
- func (br *ByteReader) ReadF64() float64
- func (br *ByteReader) ReadIPv4() [4]byte
- func (br *ByteReader) ReadIPv4Slice() [][4]byte
- func (br *ByteReader) ReadNetworkV4() [5]byte
- func (br *ByteReader) ReadNetworkV4Slice() [][5]byte
- func (br *ByteReader) ReadPubkey() [32]byte
- func (br *ByteReader) ReadPubkeySlice() [][32]byte
- func (br *ByteReader) ReadString() string
- func (br *ByteReader) ReadU8() uint8
- func (br *ByteReader) ReadU16() uint16
- func (br *ByteReader) ReadU32() uint32
- func (br *ByteReader) ReadU64() uint64
- func (br *ByteReader) ReadU128() Uint128
- func (br *ByteReader) Remaining() uint32
- type Client
- type Config
- type CyoaType
- type Device
- type DeviceStatus
- type Exchange
- type ExchangeStatus
- type Interface
- type InterfaceType
- type Link
- type LinkLinkType
- type LinkStatus
- type Location
- type LocationStatus
- type LoopbackType
- type MulticastGroup
- type MulticastGroupStatus
- type ProgramData
- type RPCClient
- type Uint128
- type User
- type UserStatus
- type UserUserType
Constants ¶
View Source
const ( SERVICEABILITY_PROGRAM_ID_TESTNET = "DZtnuQ839pSaDMFG5q1ad2V95G82S5EC4RrB3Ndw2Heb" SERVICEABILITY_PROGRAM_ID_DEVNET = "GYhQDKuESrasNZGyhMJhGYFtbzNijYhcrN9poSqCQVah" )
View Source
const ( UserTypeIBRL = iota UserTypeIBRLWithAllocatedIP UserTypeEdgeFiltering UserTypeMulticast )
View Source
const CurrentInterfaceVersion = 1
Variables ¶
This section is empty.
Functions ¶
func DeserializeConfig ¶
func DeserializeConfig(reader *ByteReader, cfg *Config)
func DeserializeDevice ¶
func DeserializeDevice(reader *ByteReader, dev *Device)
func DeserializeExchange ¶
func DeserializeExchange(reader *ByteReader, exchange *Exchange)
func DeserializeInterface ¶
func DeserializeInterface(reader *ByteReader, iface *Interface)
func DeserializeLink ¶
func DeserializeLink(reader *ByteReader, link *Link)
func DeserializeLocation ¶
func DeserializeLocation(reader *ByteReader, loc *Location)
func DeserializeMulticastGroup ¶
func DeserializeMulticastGroup(reader *ByteReader, multicastgroup *MulticastGroup)
func DeserializeUser ¶
func DeserializeUser(reader *ByteReader, user *User)
Types ¶
type AccountType ¶
type AccountType uint8
const ( GlobalState AccountType = iota + 1 ConfigType LocationType ExchangeType DeviceType LinkType UserType MulticastGroupType )
type ByteReader ¶
type ByteReader struct {
// contains filtered or unexported fields
}
func NewByteReader ¶
func NewByteReader(data []byte) *ByteReader
func (*ByteReader) ReadF64 ¶
func (br *ByteReader) ReadF64() float64
func (*ByteReader) ReadIPv4 ¶
func (br *ByteReader) ReadIPv4() [4]byte
func (*ByteReader) ReadIPv4Slice ¶
func (br *ByteReader) ReadIPv4Slice() [][4]byte
func (*ByteReader) ReadNetworkV4 ¶
func (br *ByteReader) ReadNetworkV4() [5]byte
func (*ByteReader) ReadNetworkV4Slice ¶
func (br *ByteReader) ReadNetworkV4Slice() [][5]byte
func (*ByteReader) ReadPubkey ¶
func (br *ByteReader) ReadPubkey() [32]byte
func (*ByteReader) ReadPubkeySlice ¶
func (br *ByteReader) ReadPubkeySlice() [][32]byte
func (*ByteReader) ReadString ¶
func (br *ByteReader) ReadString() string
func (*ByteReader) ReadU8 ¶
func (br *ByteReader) ReadU8() uint8
func (*ByteReader) ReadU16 ¶
func (br *ByteReader) ReadU16() uint16
func (*ByteReader) ReadU32 ¶
func (br *ByteReader) ReadU32() uint32
func (*ByteReader) ReadU64 ¶
func (br *ByteReader) ReadU64() uint64
func (*ByteReader) ReadU128 ¶
func (br *ByteReader) ReadU128() Uint128
func (*ByteReader) Remaining ¶
func (br *ByteReader) Remaining() uint32
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetProgramData ¶
func (c *Client) GetProgramData(ctx context.Context) (*ProgramData, error)
type Device ¶
type Device struct {
AccountType AccountType
Owner [32]uint8
Index Uint128
Bump_seed uint8
LocationPubKey [32]uint8
ExchangePubKey [32]uint8
DeviceType uint8
PublicIp [4]uint8
Status DeviceStatus
Code string
DzPrefixes [][5]uint8
MetricsPublisherPubKey [32]uint8
ContributorPubKey [32]byte
BgpAsn uint32
DiaBgpAsn uint32
MgmtVrf string
DnsServers [][4]uint8
NtpServers [][4]uint8
Interfaces []Interface
PubKey [32]byte
}
type DeviceStatus ¶
type DeviceStatus uint8
const ( DeviceStatusPending DeviceStatus = iota DeviceStatusActivated DeviceStatusSuspended DeviceStatusDeleted )
type ExchangeStatus ¶
type ExchangeStatus uint8
const ( ExchangeStatusPending ExchangeStatus = iota ExchangeStatusActivated ExchangeStatusSuspended ExchangeStatusDeleted )
type Interface ¶
type Interface struct {
Version uint8
Name string
InterfaceType InterfaceType
LoopbackType LoopbackType
VlanId uint16
IpNet [5]uint8
NodeSegmentIdx uint16
UserTunnelEndpoint bool
}
type InterfaceType ¶
type InterfaceType uint8
const ( InterfaceTypeInvalid InterfaceType = iota InterfaceTypeLoopback InterfaceTypePhysical )
type Link ¶
type Link struct {
AccountType AccountType
Owner [32]uint8
Index Uint128
Bump_seed uint8
SideAPubKey [32]uint8
SideZPubKey [32]uint8
LinkType LinkLinkType
Bandwidth uint64
Mtu uint32
DelayNs uint64
JitterNs uint64
TunnelId uint16
TunnelNet [5]uint8
Status LinkStatus
Code string
ContributorPubKey [32]uint8
SideAIfaceName string
SideZIfaceName string
PubKey [32]byte
}
type LinkLinkType ¶
type LinkLinkType uint8
const (
LinkLinkTypeMPLSoverGRE LinkLinkType = iota + 1
)
type LinkStatus ¶
type LinkStatus uint8
const ( LinkStatusPending LinkStatus = iota LinkStatusActivated LinkStatusSuspended LinkStatusDeleted )
type LocationStatus ¶
type LocationStatus uint8
const ( LocationStatusPending LocationStatus = iota LocationStatusActivated LocationStatusSuspended LocationStatusDeleted )
type LoopbackType ¶
type LoopbackType uint8
const ( LoopbackTypeNone LoopbackType = iota LoopbackTypeVpnv4 LoopbackTypeIpv4 LoopbackTypePimRpAddr LoopbackTypeReserved )
type MulticastGroup ¶
type MulticastGroup struct {
AccountType AccountType
Owner [32]uint8
Index Uint128
Bump_seed uint8
TenantPubKey [32]uint8
MulticastIp [4]uint8
MaxBandwidth uint64
Status MulticastGroupStatus
Code string
PubAllowList [][32]uint8
SubAllowList [][32]uint8
Publishers [][32]uint8
Subscribers [][32]uint8
PubKey [32]byte
}
type MulticastGroupStatus ¶
type MulticastGroupStatus uint8
const ( MulticastGroupStatusPending MulticastGroupStatus = iota MulticastGroupStatusActivated MulticastGroupStatusSuspended MulticastGroupStatusDeleted )
type ProgramData ¶
type RPCClient ¶
type RPCClient interface {
GetProgramAccounts(context.Context, solana.PublicKey) (rpc.GetProgramAccountsResult, error)
}
RPCClient is an interface for interacting with the Solana RPC server.
type User ¶
type User struct {
AccountType AccountType
Owner [32]uint8
Index Uint128
Bump_seed uint8
UserType UserUserType
TenantPubKey [32]uint8
DevicePubKey [32]uint8
CyoaType CyoaType
ClientIp [4]uint8
DzIp [4]uint8
TunnelId uint16
TunnelNet [5]uint8
Status UserStatus
Publishers [][32]uint8
Subscribers [][32]uint8
PubKey [32]byte
}
type UserStatus ¶
type UserStatus uint8
const ( UserStatusPending UserStatus = iota UserStatusActivated UserStatusSuspended UserStatusDeleted )
type UserUserType ¶
type UserUserType uint8
Click to show internal directories.
Click to hide internal directories.