common

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MinMTU = 1280
	MaxMTU = (1 << 16) - 1
	// SupportedMTU is the MTU supported by dispatcher/snet and router.
	// Smaller than MaxMTU to avoid excessive overallocation for packet buffers.
	// It's chosen as a common ethernet jumbo frame size minus IP/UDP headers.
	SupportedMTU = 9216 - 20 - 8
	TimeFmt      = "2006-01-02 15:04:05.000000-0700"
	TimeFmtSecs  = "2006-01-02 15:04:05-0700"
)

Variables

This section is empty.

Functions

func TypeOf

func TypeOf(v interface{}) string

Types

type ErrMsg

type ErrMsg string

ErrMsg should be used for error string constants. The constant can then be used for Is checking in the calling code.

func (ErrMsg) Error

func (e ErrMsg) Error() string

type IFIDType deprecated

type IFIDType uint64

IFIDType is the type for interface IDs.

Deprecated: with version 2 of the SCION header, there is no interface ID type anymore. Use the appropriate type depending on the path type.

func (IFIDType) String

func (ifid IFIDType) String() string

func (*IFIDType) UnmarshalJSON

func (ifid *IFIDType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the JSON data into the IfID.

func (*IFIDType) UnmarshalText

func (ifid *IFIDType) UnmarshalText(text []byte) error

UnmarshalText unmarshals the text into the IfID.

Jump to

Keyboard shortcuts

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