Versions in this module Expand all Collapse all v0 v0.2.2 Jan 15, 2025 Changes in this version + const CodeAccountNotFound + const CodeBurnTransactionNotFound + const CodeDepositFeeNotFound + const CodeFailedToDecode + const CodeGenericError + const CodeInvalidVersion + const CodeIsUsurped + const CodeMintTransactionNotFound + const CodeNoError + const CodeNotFound + const CodeRefundTransactionNotFound + const CodeUnknownVersion + const RootFSPropagationPrivate + const RootFSPropagationRprivate + const RootFSPropagationRshared + const RootFSPropagationRslave + const RootFSPropagationShared + const RootFSPropagationSlave + var DefaultMountOptions = MountOptions + var DefaultSysCall = &defaultSysCall + var DefaultSystemOS = &defaultFileSystem + var ReadOnlyMountOptions = MountOptions + type Boot struct + Path string + Type BootType + type BootType uint8 + const BootDisk + const BootVirtioFS + type BrokenDevice struct + Err error + Path string + type BrokenPool struct + Err error + Label string + type Container struct + CPU uint + CreatedAt time.Time + Elevated bool + Entrypoint string + Env []string + Interactive bool + Logs []logger.Logs + Memory gridtypes.Unit + Mounts []MountInfo + Name string + Network NetworkInfo + RootFS string + RootFsPropagation RootFSPropagation + ShutdownTimeout time.Duration + Stats []Stats + WorkingDir string + type ContainerID string + type ContainerModule interface + Delete func(ns string, id ContainerID) error + Exec func(ns string, containerID string, timeout time.Duration, args ...string) error + Inspect func(ns string, id ContainerID) (Container, error) + List func(ns string) ([]ContainerID, error) + ListNS func() ([]string, error) + Logs func(ns string, containerID string) (logs string, err error) + Run func(ns string, data Container) (ContainerID, error) + SignalDelete func(ns string, id ContainerID) error + type ContainerNetworkConfig struct + IPs []string + PublicIP6 bool + YggdrasilIP bool + type ContractCancelledEvent struct + Contract uint64 + TwinId uint32 + type ContractLockedEvent struct + Contract uint64 + Lock bool + TwinId uint32 + type Counters struct + System gridtypes.Capacity + Total gridtypes.Capacity + Used gridtypes.Capacity + Users UsersCounters + type Device struct + ID string + Path string + Usage Usage + type DeviceType = zos.DeviceType + type DiskIOCountersStat struct + Time time.Time + func (s *DiskIOCountersStat) String() string + type DisksIOCountersStat map[string]DiskIOCountersStat + type ErrInvalidDeviceType struct + DeviceType DeviceType + func (e ErrInvalidDeviceType) Error() string + type ErrNotEnoughSpace struct + DeviceType DeviceType + func (e ErrNotEnoughSpace) Error() string + type ExitDevice struct + AsDualInterface string + IsDual bool + IsSingle bool + func (e *ExitDevice) String() string + type FarmID uint32 + type Flister interface + Exists func(name string) (bool, error) + FlistHash func(url string) (string, error) + HashFromRootPath func(name string) (string, error) + Mount func(name, url string, opt MountOptions) (path string, err error) + Unmount func(name string) error + UpdateMountSize func(name string, limit gridtypes.Unit) (path string, err error) + type GPUInfo struct + Contract uint64 + Device string + ID string + Vendor string + type Gateway interface + DeleteNamedProxy func(wlID string) error + Metrics func() (GatewayMetrics, error) + SetFQDNProxy func(wlID string, config zos.GatewayFQDNProxy) error + SetNamedProxy func(wlID string, config zos.GatewayNameProxy) (string, error) + type GatewayMetrics struct + Request map[string]float64 + Response map[string]float64 + func (m *GatewayMetrics) Nu(service string) (result uint64) + type HostMonitor interface + Uptime func(ctx context.Context) <-chan time.Duration type IdentityManager + Address func() (Address, error) + type IfaceType string + const MacVlanIface + const VlanIface + type Interface struct + IPs []net.IPNet + Mac string + Name string + type Interfaces struct + Interfaces map[string]Interface + type KernelArgs map[string]string + func (s KernelArgs) Extend(k KernelArgs) + func (s KernelArgs) String() string + type MachineInfo struct + ConsoleURL string + type MachineMetric struct + Private NetMetric + Public NetMetric + type MachineMetrics map[string]MachineMetric + type MountInfo struct + Source string + Target string + type MountOptions struct + Limit gridtypes.Unit + PersistedVolume string + ReadOnly bool + Storage string + type NetID = zos.NetID + type NetMetric struct + NetRxBytes uint64 + NetRxPackets uint64 + NetTxBytes uint64 + NetTxPackets uint64 + func (n *NetMetric) Nu() float64 + type NetResourceMetrics map[string]NetMetric + type NetlinkAddress netlink.Addr + type NetlinkAddresses []stdnet.IPNet + type Network struct + NetID NetID + type NetworkInfo struct + Namespace string + type Networker interface + Addrs func(iface string, netns string) (ips []net.IP, mac string, err error) + CreateNR func(wl gridtypes.WorkloadID, network Network) (string, error) + DMZAddresses func(ctx context.Context) <-chan NetlinkAddresses + DeleteNR func(wl gridtypes.WorkloadID) error + DisconnectPubTap func(name string) error + EnsureZDBPrepare func(id string) (string, error) + GetDefaultGwIP func(networkID NetID) (net.IP, net.IP, error) + GetIPv6From4 func(networkID NetID, ip net.IP) (net.IPNet, error) + GetNet func(networkID NetID) (net.IPNet, error) + GetPublicConfig func() (PublicConfig, error) + GetPublicExitDevice func() (ExitDevice, error) + GetPublicIPV6Gateway func() (net.IP, error) + GetPublicIPv6Subnet func() (net.IPNet, error) + GetSubnet func(networkID NetID) (net.IPNet, error) + Interfaces func(iface string, netns string) (Interfaces, error) + Metrics func() (NetResourceMetrics, error) + Namespace func(id zos.NetID) string + PubIPFilterExists func(filterName string) bool + PubTapExists func(name string) (bool, error) + PublicAddresses func(ctx context.Context) <-chan OptionPublicConfig + PublicIPv4Support func() bool + QSFSDestroy func(id string) error + QSFSNamespace func(id string) string + QSFSPrepare func(id string) (string, string, error) + QSFSYggIP func(id string) (string, error) + Ready func() error + RemovePubIPFilter func(filterName string) error + RemovePubTap func(name string) error + RemoveTap func(name string) error + SetPublicConfig func(cfg PublicConfig) error + SetPublicExitDevice func(iface string) error + SetupMyceliumTap func(name string, netID zos.NetID, config zos.MyceliumIP) (PlanetaryTap, error) + SetupPrivTap func(networkID NetID, name string) (tap string, err error) + SetupPubIPFilter func(filterName string, iface string, ipv4 net.IP, ipv6 net.IP, mac string) error + SetupPubTap func(name string) (string, error) + SetupYggTap func(name string) (PlanetaryTap, error) + TapExists func(name string) (bool, error) + UnsetPublicConfig func() error + WireguardPorts func() ([]uint, error) + YggAddresses func(ctx context.Context) <-chan NetlinkAddresses + ZDBDestroy func(ns string) error + ZOSAddresses func(ctx context.Context) <-chan NetlinkAddresses + type NetworkerLight interface + AttachMycelium func(name, id string, seed []byte) (device TapDevice, err error) + AttachPrivate func(name, id string, vmIp net.IP) (device TapDevice, err error) + AttachZDB func(id string) (string, error) + Create func(name string, privateNet net.IPNet, seed []byte) error + Delete func(name string) error + Detach func(id string) error + GetSubnet func(networkID NetID) (net.IPNet, error) + Interfaces func(iface string, netns string) (Interfaces, error) + Namespace func(id string) string + Ready func() error + ZDBIPs func(namespace string) ([]net.IP, error) + ZOSAddresses func(ctx context.Context) <-chan NetlinkAddresses + type NicIOCounterStat struct + RateIn uint64 + RateOut uint64 + type NicsIOCounterStat []NicIOCounterStat + type NodeFeature string + type OptionPublicConfig struct + HasPublicConfig bool + type PerformanceMonitor interface + Get func(taskName string) (TaskResult, error) + GetAll func() ([]TaskResult, error) + type PlanetaryTap struct + Gateway net.IPNet + HW net.HardwareAddr + IP net.IPNet + Name string + type PoolMetrics struct + Name string + Size gridtypes.Unit + Type DeviceType + Used gridtypes.Unit + type PoolStats struct + Counters map[string]disk.IOCountersStat + type PoolsStats map[string]PoolStats + type PowerTargetChangeEvent struct + FarmID FarmID + NodeID uint32 + Target substrate.Power + type Provision interface + Changes func(twin uint32, contractID uint64) ([]gridtypes.Workload, error) + CreateOrUpdate func(twin uint32, deployment gridtypes.Deployment, update bool) error + DecommissionCached func(id string, reason string) error + Get func(twin uint32, contractID uint64) (gridtypes.Deployment, error) + GetWorkloadStatus func(id string) (gridtypes.ResultState, bool, error) + List func(twin uint32) ([]gridtypes.Deployment, error) + ListPrivateIPs func(twin uint32, network gridtypes.Name) ([]string, error) + ListPublicIPs func() ([]string, error) + type PublicConfig struct + Domain string + GW4 net.IP + GW6 net.IP + IPv4 gridtypes.IPNet + IPv6 gridtypes.IPNet + Type IfaceType + func PublicConfigFrom(cfg substrate.PublicConfig) (pub PublicConfig, err error) + func (p *PublicConfig) IsEmpty() bool + func (p PublicConfig) Equal(cfg PublicConfig) bool + type PublicConfigEvent struct + PublicConfig substrate.OptionPublicConfig + type QSFSD interface + Metrics func() (QSFSMetrics, error) + Mount func(wlID string, cfg zos.QuantumSafeFS) (QSFSInfo, error) + SignalDelete func(wlID string) error + UpdateMount func(wlID string, cfg zos.QuantumSafeFS) (QSFSInfo, error) + type QSFSInfo struct + MetricsEndpoint string + Path string + type QSFSMetrics struct + Consumption map[string]NetMetric + func (q *QSFSMetrics) Nu(wlID string) (result uint64) + type RootFSPropagation string + type Route struct + Gateway net.IP + Net net.IPNet + type SharedDir struct + ID string + Path string + Target string + type Statistics interface + Current func() (gridtypes.Capacity, error) + GetCounters func() (Counters, error) + ListGPUs func() ([]GPUInfo, error) + ReservedStream func(ctx context.Context) <-chan gridtypes.Capacity + Total func() gridtypes.Capacity + Workloads func() (int, error) + type Stats struct + Endpoint string + Type string + type StorageModule interface + BrokenDevices func() []BrokenDevice + BrokenPools func() []BrokenPool + Cache func() (Volume, error) + DeviceAllocate func(min gridtypes.Unit) (Device, error) + DeviceLookup func(name string) (Device, error) + Devices func() ([]Device, error) + DiskCreate func(name string, size gridtypes.Unit) (VDisk, error) + DiskDelete func(name string) error + DiskExists func(name string) bool + DiskFormat func(name string) error + DiskList func() ([]VDisk, error) + DiskLookup func(name string) (VDisk, error) + DiskResize func(name string, size gridtypes.Unit) (VDisk, error) + DiskWrite func(name string, image string) error + Metrics func() ([]PoolMetrics, error) + Monitor func(ctx context.Context) <-chan PoolsStats + Total func(kind DeviceType) (uint64, error) + VolumeCreate func(name string, size gridtypes.Unit) (Volume, error) + VolumeDelete func(name string) error + VolumeExists func(name string) (bool, error) + VolumeList func() ([]Volume, error) + VolumeLookup func(name string) (Volume, error) + VolumeUpdate func(name string, size gridtypes.Unit) error + type Stream struct + ID string + Namespace string + Output string + func (s *Stream) Valid() error + type SubstrateError struct + Code int + Err error + func (e *SubstrateError) IsCode(codes ...int) bool + func (e *SubstrateError) IsError() bool + type SubstrateGateway interface + CreateNode func(node substrate.Node) (uint32, error) + CreateTwin func(relay string, pk []byte) (uint32, error) + EnsureAccount func(activationURL []string, termsAndConditionsLink string, ...) (info substrate.AccountInfo, err error) + GetContract func(id uint64) (substrate.Contract, SubstrateError) + GetContractIDByNameRegistration func(name string) (uint64, SubstrateError) + GetFarm func(id uint32) (substrate.Farm, error) + GetNode func(id uint32) (substrate.Node, error) + GetNodeByTwinID func(twin uint32) (uint32, SubstrateError) + GetNodeContracts func(node uint32) ([]types.U64, error) + GetNodeRentContract func(node uint32) (uint64, SubstrateError) + GetNodes func(farmID uint32) ([]uint32, error) + GetPowerTarget func(nodeID uint32) (power substrate.NodePower, err error) + GetTime func() (time.Time, error) + GetTwin func(id uint32) (substrate.Twin, error) + GetTwinByPubKey func(pk []byte) (uint32, SubstrateError) + GetZosVersion func() (string, error) + Report func(consumptions []substrate.NruConsumption) (types.Hash, error) + SetContractConsumption func(resources ...substrate.ContractResources) error + SetNodePowerState func(up bool) (hash types.Hash, err error) + UpdateNode func(node substrate.Node) (uint32, error) + UpdateNodeUptimeV2 func(uptime uint64, timestampHint uint64) (hash types.Hash, err error) + type SystemCall interface + Mount func(string, string, string, uintptr, string) error + type SystemMonitor interface + CPU func(ctx context.Context) <-chan TimesStat + Disks func(ctx context.Context) <-chan DisksIOCountersStat + GetNodeFeatures func() []NodeFeature + Memory func(ctx context.Context) <-chan VirtualMemoryStat + Nics func(ctx context.Context) <-chan NicsIOCounterStat + NodeID func() uint32 + type SystemOS interface + Create func(string) (io.ReadCloser, error) + IsNotExist func(error) bool + Mkdir func(string, fs.FileMode) error + MkdirAll func(string, fs.FileMode) error + RemoveAll func(string) error + Stat func(string) (fs.FileInfo, error) + type SystemOSMock struct + func (os *SystemOSMock) Create(path string) (io.ReadCloser, error) + func (os *SystemOSMock) IsNotExist(err error) bool + func (os *SystemOSMock) Mkdir(path string, perm fs.FileMode) error + func (os *SystemOSMock) MkdirAll(path string, perm fs.FileMode) error + func (os *SystemOSMock) Mount(source string, target string, fstype string, flags uintptr, data string) error + func (os *SystemOSMock) RemoveAll(path string) error + func (os *SystemOSMock) Stat(path string) (fs.FileInfo, error) + type TapDevice struct + IP *net.IPNet + Mac net.HardwareAddr + Name string + Routes []Route + type TaskResult struct + Description string + Name string + Result interface{} + Timestamp uint64 + type TimesStat struct + Percent float64 + Time time.Time + func (s *TimesStat) String() string + type Usage struct + Size gridtypes.Unit + Used gridtypes.Unit + type UsersCounters struct + Deployments int + LastDeploymentTimestamp gridtypes.Timestamp + Workloads int + type VDisk struct + Path string + Size int64 + func (d *VDisk) Name() string + type VM struct + Boot Boot + CPU uint8 + Devices []string + Disks []VMDisk + Entrypoint string + Environment map[string]string + Hostname string + InitrdImage string + KernelArgs KernelArgs + KernelImage string + Memory gridtypes.Unit + Name string + Network VMNetworkInfo + NoKeepAlive bool + Shared []SharedDir + func (vm *VM) Validate() error + type VMDisk struct + Path string + Target string + type VMIface struct + IP4DefaultGateway net.IP + IP6DefaultGateway net.IP + IPs []net.IPNet + MAC string + NetID zos.NetID + PublicIPv4 bool + PublicIPv6 bool + Routes []Route + Tap string + type VMInfo struct + CPU int64 + HtEnabled bool + Memory int64 + type VMModule interface + Delete func(name string) error + Exists func(name string) bool + Inspect func(name string) (VMInfo, error) + List func() ([]string, error) + Lock func(name string, lock bool) error + Logs func(name string) (string, error) + Metrics func() (MachineMetrics, error) + Run func(vm VM) (MachineInfo, error) + StreamCreate func(name string, stream Stream) error + StreamDelete func(id string) error + type VMNetworkInfo struct + Ifaces []VMIface + Nameservers []net.IP + type VersionMonitor interface + GetVersion func() semver.Version + Version func(ctx context.Context) <-chan semver.Version + type VirtualMemoryStat mem.VirtualMemoryStat + type Volume struct + Name string + Path string + Usage Usage + type ZUI interface + PushErrors func(label string, errors []string) error v0.1.11 May 27, 2025 v0.1.10 May 7, 2025 v0.1.9 May 6, 2025 v0.1.8 Feb 25, 2025 v0.1.7 Feb 20, 2025 v0.1.6 Feb 20, 2025 Changes in this version + type Address string + func (s Address) String() string + type Identifier interface + Identity func() string + type IdentityManager interface + Decrypt func(message []byte) ([]byte, error) + DecryptECDH func(msg []byte, publicKey []byte) ([]byte, error) + Encrypt func(message []byte) ([]byte, error) + EncryptECDH func(msg []byte, publicKey []byte) ([]byte, error) + Farm func() (string, error) + FarmID func() pkg.FarmID + FarmSecret func() string + NodeID func() StrIdentifier + PrivateKey func() []byte + Sign func(message []byte) ([]byte, error) + StoreKind func() string + Verify func(message, sig []byte) error + type Registrar interface + NodeID func() (uint32, error) + TwinID func() (uint32, error) + type RegistrarGateway interface + CreateNode func(node types.UpdateNodeRequest) (uint64, error) + CreateTwin func(relay string, pk []byte) (types.Account, error) + EnsureAccount func(pk []byte) (twin types.Account, err error) + GetContract func(id uint64) (substrate.Contract, pkg.SubstrateError) + GetContractIDByNameRegistration func(name string) (uint64, pkg.SubstrateError) + GetFarm func(id uint64) (types.Farm, error) + GetNode func(id uint64) (types.Node, error) + GetNodeByTwinID func(twin uint64) (uint64, error) + GetNodeContracts func(node uint32) ([]substrateTypes.U64, error) + GetNodeRentContract func(node uint32) (uint64, pkg.SubstrateError) + GetNodes func(farmID uint32) ([]uint32, error) + GetPowerTarget func() (power substrate.NodePower, err error) + GetTime func() (time.Time, error) + GetTwin func(id uint64) (types.Account, error) + GetTwinByPubKey func(pk []byte) (uint64, error) + GetZosVersion func() (string, error) + Report func(consumptions []substrate.NruConsumption) (substrateTypes.Hash, error) + SetContractConsumption func(resources ...substrate.ContractResources) error + SetNodePowerState func(up bool) (hash substrateTypes.Hash, err error) + UpdateNode func(node types.UpdateNodeRequest) (uint64, error) + UpdateNodeUptimeV2 func(uptime uint64, timestampHint uint64) (err error) + type StrIdentifier string + func (s StrIdentifier) Identity() string