system

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Zlib Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	IPT_UNK   = IPType(0)
	IPT_PUB   = IPType(1)
	IPT_PRI_A = IPType(2)
	IPT_PRI_B = IPType(3)
	IPT_PRI_C = IPType(4)
)

Variables

View Source
var (
	ResolveIp = net.IP{}
)

Functions

func IPEqualSelf

func IPEqualSelf(ip string) string

func Info

func Info() string

func IsPublicIP

func IsPublicIP(IP net.IP) bool

func Quit

func Quit()

func Run added in v0.2.3

func Run()

func SelfPubIP

func SelfPubIP() string

Types

type Chan

type Chan struct {
	S chan os.Signal
}

func Exit added in v0.2.7

func Exit() *Chan

type Event

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

Event represents a one-time event that may occur in the future.

func NewEvent

func NewEvent() *Event

NewEvent returns a new, ready-to-use Event.

func (*Event) Done

func (e *Event) Done() <-chan struct{}

Done returns a channel that will be closed when Fire is called.

func (*Event) Fire

func (e *Event) Fire() bool

Fire causes e to complete. It is safe to call multiple times, and concurrently. It returns true iff this call to Fire caused the signaling channel returned by Done to close.

func (*Event) HasFired

func (e *Event) HasFired() bool

HasFired returns true if Fire has been called.

type IPType

type IPType int8

func GetIPType

func GetIPType(IP net.IP) IPType

Jump to

Keyboard shortcuts

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