siginfo

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sig

type Sig struct {
	IA          addr.IA
	Id          SigIdType
	Host        addr.HostAddr
	CtrlL4Port  int
	EncapL4Port int
	Active      bool
	// If from local config file true, else from discovery, so false.
	Static bool
	// contains filtered or unexported fields
}

func NewSig

func NewSig(ia addr.IA, id SigIdType, host addr.HostAddr,
	ctrlPort, encapPort int, static bool) *Sig

func (*Sig) Cleanup

func (s *Sig) Cleanup() error

func (*Sig) CtrlSnetAddr

func (s *Sig) CtrlSnetAddr() *snet.Addr

func (*Sig) EncapSnetAddr

func (s *Sig) EncapSnetAddr() *snet.Addr

func (*Sig) ExpireFails

func (s *Sig) ExpireFails()

func (*Sig) Fail

func (s *Sig) Fail()

func (*Sig) FailCount

func (s *Sig) FailCount() uint16

func (*Sig) String

func (s *Sig) String() string

type SigIdType

type SigIdType string

type SigMap

type SigMap sync.Map

func (*SigMap) Delete

func (sm *SigMap) Delete(key SigIdType)

func (*SigMap) GetSig

func (sm *SigMap) GetSig(currSigId SigIdType) *Sig

return the Sig with the lowest fail count.

func (*SigMap) Load

func (sm *SigMap) Load(key SigIdType) (*Sig, bool)

func (*SigMap) LoadOrStore

func (sm *SigMap) LoadOrStore(key SigIdType, value *Sig) (*Sig, bool)

func (*SigMap) Range

func (sm *SigMap) Range(f func(key SigIdType, value *Sig) bool)

func (*SigMap) Store

func (sm *SigMap) Store(key SigIdType, value *Sig)

Jump to

Keyboard shortcuts

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