lib

package
v1.999.224 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 25 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppAlreadyLoaded     = fmt.Errorf("application is already loaded")
	ErrAppAlreadyStarted    = fmt.Errorf("application is already started")
	ErrAppUnknown           = fmt.Errorf("unknown application name")
	ErrAppIsNotRunning      = fmt.Errorf("application is not running")
	ErrNameUnknown          = fmt.Errorf("unknown name")
	ErrNameOwner            = fmt.Errorf("not an owner")
	ErrProcessBusy          = fmt.Errorf("process is busy")
	ErrProcessMailboxFull   = fmt.Errorf("process mailbox is full")
	ErrProcessUnknown       = fmt.Errorf("unknown process")
	ErrProcessContext       = fmt.Errorf("not a Process context")
	ErrProcessIncarnation   = fmt.Errorf("process ID belongs to the previous incarnation")
	ErrProcessTerminated    = fmt.Errorf("process terminated")
	ErrMonitorUnknown       = fmt.Errorf("unknown monitor reference")
	ErrSenderUnknown        = fmt.Errorf("unknown sender")
	ErrBehaviorUnknown      = fmt.Errorf("unknown behavior")
	ErrBehaviorGroupUnknown = fmt.Errorf("unknown behavior group")
	ErrAliasUnknown         = fmt.Errorf("unknown alias")
	ErrAliasOwner           = fmt.Errorf("not an owner")
	ErrEventMismatch        = fmt.Errorf("message type mismatch")
	ErrEventUnknown         = fmt.Errorf("unknown event type")
	ErrEventOwner           = fmt.Errorf("not an owner")
	ErrEventSelf            = fmt.Errorf("monitor events from itself")
	ErrNoRoute              = fmt.Errorf("no route to node")
	ErrTaken                = fmt.Errorf("resource is taken")
	ErrFragmented           = fmt.Errorf("fragmented data")
	ErrReferenceUnknown     = fmt.Errorf("unknown reference")

	ErrRouteName = fmt.Errorf("incorrect route name")

	ErrTimeout         = fmt.Errorf("timed out")
	ErrUnsupported     = fmt.Errorf("not supported")
	ErrUnknown         = fmt.Errorf("unknown")
	ErrPeerUnsupported = fmt.Errorf("peer does not support this feature")

	ErrUnsupportedRequest = fmt.Errorf("unsupported request")
	ErrServerTerminated   = fmt.Errorf("server terminated")

	ErrProxyUnknownRequest    = fmt.Errorf("unknown proxy request")
	ErrProxyTransitDisabled   = fmt.Errorf("proxy feature disabled")
	ErrProxyTransitRestricted = fmt.Errorf("proxy connect restricted")
	ErrProxyNoRoute           = fmt.Errorf("no proxy route to node")
	ErrProxyConnect           = fmt.Errorf("can't establish proxy connection")
	ErrProxyHopExceeded       = fmt.Errorf("proxy hop is exceeded")
	ErrProxyLoopDetected      = fmt.Errorf("proxy loop detected")
	ErrProxyPathTooLong       = fmt.Errorf("proxy path too long")
	ErrProxySessionUnknown    = fmt.Errorf("unknown session id")
	ErrProxySessionDuplicate  = fmt.Errorf("session is already exist")
)
View Source
var (
	DefaultBufferLength = 16384

	ErrTooLarge = fmt.Errorf("Too large")

	CRC32Q = crc32.MakeTable(0xD5828281)
)

Functions

func CatchPanic

func CatchPanic() bool

CatchPanic

func GenerateSelfSignedCert

func GenerateSelfSignedCert(org string, hosts ...string) (tls.Certificate, error)

GenerateSelfSignedCert

func Log

func Log(f string, a ...interface{})

Log

func RandomString

func RandomString(length int) string

RandomString

func ReleaseBuffer

func ReleaseBuffer(b *Buffer)

ReleaseBuffer

func ReleaseTimer

func ReleaseTimer(t *time.Timer)

ReleaseTimer

func TakeTimer

func TakeTimer() *time.Timer

TakeTimer

func Warning

func Warning(f string, a ...interface{})

Warning

Types

type Buffer

type Buffer struct {
	B []byte
	// contains filtered or unexported fields
}

Buffer

func TakeBuffer

func TakeBuffer() *Buffer

TakeBuffer

func (*Buffer) Allocate

func (b *Buffer) Allocate(n int)

Allocate

func (*Buffer) Append

func (b *Buffer) Append(v []byte)

Append

func (*Buffer) AppendByte

func (b *Buffer) AppendByte(v byte)

AppendByte

func (*Buffer) Extend

func (b *Buffer) Extend(n int) []byte

Extend

func (*Buffer) Len

func (b *Buffer) Len() int

Len

func (*Buffer) Read

func (b *Buffer) Read(v []byte) (n int, err error)

func (*Buffer) ReadDataFrom

func (b *Buffer) ReadDataFrom(r io.Reader, limit int) (int, error)

ReadDataFrom

func (*Buffer) Reset

func (b *Buffer) Reset()

Reset

func (*Buffer) Set

func (b *Buffer) Set(v []byte)

Set

func (*Buffer) String

func (b *Buffer) String() string

String

func (*Buffer) Write

func (b *Buffer) Write(v []byte) (n int, err error)

func (*Buffer) WriteDataTo

func (b *Buffer) WriteDataTo(w io.Writer) error

WriteDataTo

type CertUpdater

type CertUpdater struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func CreateCertUpdater

func CreateCertUpdater(cert tls.Certificate) *CertUpdater

func (*CertUpdater) GetCertificateFunc

func (cu *CertUpdater) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)

func (*CertUpdater) Update

func (cu *CertUpdater) Update(cert tls.Certificate)

type ItemMPSC

type ItemMPSC interface {
	Next() ItemMPSC
	Value() interface{}
	Clear()
}

type NetReadWriter

type NetReadWriter interface {
	NetReader
	NetWriter
}

type NetReader

type NetReader interface {
	io.Reader
	SetReadDeadline(t time.Time) error
}

type NetWriter

type NetWriter interface {
	io.Writer
	SetWriteDeadline(t time.Time) error
}

type QueueMPSC

type QueueMPSC interface {
	Push(value interface{}) bool
	Pop() (interface{}, bool)
	Item() ItemMPSC
	// Len returns the number of items in the queue
	Len() int64
}

func NewQueueLimitMPSC

func NewQueueLimitMPSC(limit int64) QueueMPSC

func NewQueueMPSC

func NewQueueMPSC() QueueMPSC

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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