endpoint

package
v1.4.36 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDP int32 = 0
	TCP int32 = 1
	SSL int32 = 2
)

Variables

This section is empty.

Functions

func Endpoint2ksf

func Endpoint2ksf(end Endpoint) endpointf.EndpointF

Endpoint2ksf transfer Endpoint to endpointf.EndpointF

func IsEqual

func IsEqual(a, b *[]endpointf.EndpointF) bool

Types

type AuthType

type AuthType int32
const (
	AuthTypeNone AuthType = iota
	AuthTypeLocal
)

type Endpoint

type Endpoint struct {
	Host       string
	Port       int32
	Timeout    int32
	Istcp      int32 //need remove
	Proto      string
	Bind       string
	Container  string
	Grid       int32
	Qos        int32
	Weight     int32
	WeightType int32
	AuthType   int32
	SetId      string
	Key        string
}

Endpoint struct is used record a remote server instance.

func Ksf2endpoint

func Ksf2endpoint(end endpointf.EndpointF) Endpoint

Ksf2endpoint make endpointf.EndpointF to Endpoint struct.

func Parse

func Parse(endpoint string) Endpoint

Parse pares string to struct Endpoint, like tcp -h 10.219.139.142 -p 19386 -t 60000

func (Endpoint) HashKey

func (e Endpoint) HashKey() string

func (Endpoint) IsSSL

func (e Endpoint) IsSSL() bool

func (Endpoint) IsTcp

func (e Endpoint) IsTcp() bool

func (Endpoint) IsUdp

func (e Endpoint) IsUdp() bool

func (Endpoint) String

func (e Endpoint) String() string

String returns readable string for Endpoint

func (Endpoint) UniqString

func (e Endpoint) UniqString() string

type WeightType

type WeightType int32
const (
	ELoop WeightType = iota
	EStaticWeight
)

Jump to

Keyboard shortcuts

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