utils

package
v0.0.0-...-0e5ff0a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KB = uint64(1024)

Functions

func Decode

func Decode(res string) *big.Int

func FloatToString

func FloatToString(val float64) string

func GetFunctionId

func GetFunctionId(value string) string

func IntToString

func IntToString(val int64) string

func NewServer

func NewServer(port string) *server

func Percent

func Percent(val float64, limit float64) string

func StringToFloat

func StringToFloat(val string) float64

Types

type DiskUsage

type DiskUsage struct {
	Free      uint64 `json:"free"`
	Available uint64 `json:"available"`
	Size      uint64 `json:"size"`
	Used      uint64 `json:"used"`
	Usage     uint64 `json:"usage"`
	Dir       uint64 `json:"dir"`
	// contains filtered or unexported fields
}

func NewDiskUsage

func NewDiskUsage(volumePath string, refresh uint64) *DiskUsage

func (*DiskUsage) Start

func (usage *DiskUsage) Start()

func (*DiskUsage) Update

func (usage *DiskUsage) Update()

type Fetcher

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

func NewFetcher

func NewFetcher(host string) *Fetcher

func (*Fetcher) Get

func (fetcher *Fetcher) Get(method string) interface{}

func (*Fetcher) GetBalance

func (fetcher *Fetcher) GetBalance(address string) *big.Int

Jump to

Keyboard shortcuts

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