types

package
v0.52.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MB = 1024 * 1024
	KB = 1024

	BandwidthLimitModeClient = "client"
	BandwidthLimitModeServer = "server"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BandwidthQuantity

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

func MustBandwidthQuantity

func MustBandwidthQuantity(s string) BandwidthQuantity

func NewBandwidthQuantity

func NewBandwidthQuantity(s string) (BandwidthQuantity, error)

func (*BandwidthQuantity) Bytes

func (q *BandwidthQuantity) Bytes() int64

func (*BandwidthQuantity) Equal

func (*BandwidthQuantity) MarshalJSON

func (q *BandwidthQuantity) MarshalJSON() ([]byte, error)

func (*BandwidthQuantity) String

func (q *BandwidthQuantity) String() string

func (*BandwidthQuantity) UnmarshalJSON

func (q *BandwidthQuantity) UnmarshalJSON(b []byte) error

func (*BandwidthQuantity) UnmarshalString

func (q *BandwidthQuantity) UnmarshalString(s string) error

type PortsRange

type PortsRange struct {
	Start  int `json:"start,omitempty"`
	End    int `json:"end,omitempty"`
	Single int `json:"single,omitempty"`
}

func NewPortsRangeSliceFromString

func NewPortsRangeSliceFromString(str string) ([]PortsRange, error)

the format of str is like "1000-2000,3000,4000-5000"

type PortsRangeSlice

type PortsRangeSlice []PortsRange

func (PortsRangeSlice) String

func (p PortsRangeSlice) String() string

Jump to

Keyboard shortcuts

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