latency

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NatType_name = map[int32]string{
		0: "NAT_UNKNOWN",
		1: "NAT_NO_RESULT",
		2: "NAT_EndpointIndependentNoNAT",
		3: "NAT_EndpointIndependent",
		4: "NAT_AddressDependent",
		5: "NAT_AddressAndPortDependent",
		6: "NAT_ServerNotSupportChangePort",
	}
	NatType_value = map[string]int32{
		"NAT_UNKNOWN":                    0,
		"NAT_NO_RESULT":                  1,
		"NAT_EndpointIndependentNoNAT":   2,
		"NAT_EndpointIndependent":        3,
		"NAT_AddressDependent":           4,
		"NAT_AddressAndPortDependent":    5,
		"NAT_ServerNotSupportChangePort": 6,
	}
)

Enum value maps for NatType.

View Source
var File_node_latency_latency_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Dns

type Dns struct {
	Host         string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	TargetDomain string `protobuf:"bytes,2,opt,name=target_domain,json=target_name,proto3" json:"target_domain,omitempty"`
	// contains filtered or unexported fields
}

func (*Dns) Descriptor deprecated

func (*Dns) Descriptor() ([]byte, []int)

Deprecated: Use Dns.ProtoReflect.Descriptor instead.

func (*Dns) GetHost

func (x *Dns) GetHost() string

func (*Dns) GetTargetDomain

func (x *Dns) GetTargetDomain() string

func (*Dns) ProtoMessage

func (*Dns) ProtoMessage()

func (*Dns) ProtoReflect

func (x *Dns) ProtoReflect() protoreflect.Message

func (*Dns) Reset

func (x *Dns) Reset()

func (*Dns) String

func (x *Dns) String() string

type DnsOverQuic

type DnsOverQuic struct {
	Host         string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	TargetDomain string `protobuf:"bytes,2,opt,name=target_domain,json=target_name,proto3" json:"target_domain,omitempty"`
	// contains filtered or unexported fields
}

func (*DnsOverQuic) Descriptor deprecated

func (*DnsOverQuic) Descriptor() ([]byte, []int)

Deprecated: Use DnsOverQuic.ProtoReflect.Descriptor instead.

func (*DnsOverQuic) GetHost

func (x *DnsOverQuic) GetHost() string

func (*DnsOverQuic) GetTargetDomain

func (x *DnsOverQuic) GetTargetDomain() string

func (*DnsOverQuic) ProtoMessage

func (*DnsOverQuic) ProtoMessage()

func (*DnsOverQuic) ProtoReflect

func (x *DnsOverQuic) ProtoReflect() protoreflect.Message

func (*DnsOverQuic) Reset

func (x *DnsOverQuic) Reset()

func (*DnsOverQuic) String

func (x *DnsOverQuic) String() string

type Http

type Http struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*Http) Descriptor deprecated

func (*Http) Descriptor() ([]byte, []int)

Deprecated: Use Http.ProtoReflect.Descriptor instead.

func (*Http) GetUrl

func (x *Http) GetUrl() string

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) ProtoReflect

func (x *Http) ProtoReflect() protoreflect.Message

func (*Http) Reset

func (x *Http) Reset()

func (*Http) String

func (x *Http) String() string

type Ip added in v0.3.6

type Ip struct {
	Url       string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	UserAgent string `protobuf:"bytes,2,opt,name=user_agent,proto3" json:"user_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*Ip) Descriptor deprecated added in v0.3.6

func (*Ip) Descriptor() ([]byte, []int)

Deprecated: Use Ip.ProtoReflect.Descriptor instead.

func (*Ip) GetUrl added in v0.3.6

func (x *Ip) GetUrl() string

func (*Ip) GetUserAgent added in v0.3.6

func (x *Ip) GetUserAgent() string

func (*Ip) ProtoMessage added in v0.3.6

func (*Ip) ProtoMessage()

func (*Ip) ProtoReflect added in v0.3.6

func (x *Ip) ProtoReflect() protoreflect.Message

func (*Ip) Reset added in v0.3.6

func (x *Ip) Reset()

func (*Ip) String added in v0.3.6

func (x *Ip) String() string

type IpResponse added in v0.3.6

type IpResponse struct {
	Ipv4 string `protobuf:"bytes,1,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Ipv6 string `protobuf:"bytes,2,opt,name=ipv6,proto3" json:"ipv6,omitempty"`
	// contains filtered or unexported fields
}

func (*IpResponse) Descriptor deprecated added in v0.3.6

func (*IpResponse) Descriptor() ([]byte, []int)

Deprecated: Use IpResponse.ProtoReflect.Descriptor instead.

func (*IpResponse) GetIpv4 added in v0.3.6

func (x *IpResponse) GetIpv4() string

func (*IpResponse) GetIpv6 added in v0.3.6

func (x *IpResponse) GetIpv6() string

func (*IpResponse) ProtoMessage added in v0.3.6

func (*IpResponse) ProtoMessage()

func (*IpResponse) ProtoReflect added in v0.3.6

func (x *IpResponse) ProtoReflect() protoreflect.Message

func (*IpResponse) Reset added in v0.3.6

func (x *IpResponse) Reset()

func (*IpResponse) String added in v0.3.6

func (x *IpResponse) String() string

type Latencier added in v0.3.6

type Latencier interface {
	Latency(netapi.Proxy) (*Reply, error)
}

type NatType added in v0.3.7

type NatType int32
const (
	NatType_NAT_UNKNOWN                    NatType = 0
	NatType_NAT_NO_RESULT                  NatType = 1
	NatType_NAT_EndpointIndependentNoNAT   NatType = 2
	NatType_NAT_EndpointIndependent        NatType = 3
	NatType_NAT_AddressDependent           NatType = 4
	NatType_NAT_AddressAndPortDependent    NatType = 5
	NatType_NAT_ServerNotSupportChangePort NatType = 6
)

func (NatType) Descriptor added in v0.3.7

func (NatType) Descriptor() protoreflect.EnumDescriptor

func (NatType) Enum added in v0.3.7

func (x NatType) Enum() *NatType

func (NatType) EnumDescriptor deprecated added in v0.3.7

func (NatType) EnumDescriptor() ([]byte, []int)

Deprecated: Use NatType.Descriptor instead.

func (NatType) Number added in v0.3.7

func (x NatType) Number() protoreflect.EnumNumber

func (NatType) String added in v0.3.7

func (x NatType) String() string

func (NatType) Type added in v0.3.7

func (NatType) Type() protoreflect.EnumType

type Protocol

type Protocol struct {

	// Types that are assignable to Protocol:
	//
	//	*Protocol_Http
	//	*Protocol_Dns
	//	*Protocol_DnsOverQuic
	//	*Protocol_Ip
	//	*Protocol_Stun
	Protocol isProtocol_Protocol `protobuf_oneof:"protocol"`
	// contains filtered or unexported fields
}

func (*Protocol) Descriptor deprecated

func (*Protocol) Descriptor() ([]byte, []int)

Deprecated: Use Protocol.ProtoReflect.Descriptor instead.

func (*Protocol) GetDns

func (x *Protocol) GetDns() *Dns

func (*Protocol) GetDnsOverQuic

func (x *Protocol) GetDnsOverQuic() *DnsOverQuic

func (*Protocol) GetHttp

func (x *Protocol) GetHttp() *Http

func (*Protocol) GetIp added in v0.3.6

func (x *Protocol) GetIp() *Ip

func (*Protocol) GetProtocol

func (m *Protocol) GetProtocol() isProtocol_Protocol

func (*Protocol) GetStun added in v0.3.7

func (x *Protocol) GetStun() *Stun

func (*Protocol) ProtoMessage

func (*Protocol) ProtoMessage()

func (*Protocol) ProtoReflect

func (x *Protocol) ProtoReflect() protoreflect.Message

func (*Protocol) Reset

func (x *Protocol) Reset()

func (*Protocol) String

func (x *Protocol) String() string

type Protocol_Dns

type Protocol_Dns struct {
	Dns *Dns `protobuf:"bytes,2,opt,name=dns,proto3,oneof"`
}

func (*Protocol_Dns) Latency

func (l *Protocol_Dns) Latency(p netapi.Proxy) (*Reply, error)

type Protocol_DnsOverQuic

type Protocol_DnsOverQuic struct {
	DnsOverQuic *DnsOverQuic `protobuf:"bytes,3,opt,name=dns_over_quic,proto3,oneof"`
}

func (*Protocol_DnsOverQuic) Latency

func (l *Protocol_DnsOverQuic) Latency(p netapi.Proxy) (*Reply, error)

type Protocol_Http

type Protocol_Http struct {
	Http *Http `protobuf:"bytes,1,opt,name=http,proto3,oneof"`
}

func (*Protocol_Http) Latency

func (l *Protocol_Http) Latency(p netapi.Proxy) (*Reply, error)

type Protocol_Ip added in v0.3.6

type Protocol_Ip struct {
	Ip *Ip `protobuf:"bytes,4,opt,name=ip,proto3,oneof"`
}

func (*Protocol_Ip) Latency added in v0.3.6

func (l *Protocol_Ip) Latency(p netapi.Proxy) (*Reply, error)

type Protocol_Stun added in v0.3.7

type Protocol_Stun struct {
	Stun *Stun `protobuf:"bytes,5,opt,name=stun,proto3,oneof"`
}

func (*Protocol_Stun) Latency added in v0.3.7

func (l *Protocol_Stun) Latency(p netapi.Proxy) (*Reply, error)

type Reply added in v0.3.6

type Reply struct {

	// Types that are assignable to Reply:
	//
	//	*Reply_Latency
	//	*Reply_Ip
	//	*Reply_Stun
	Reply isReply_Reply `protobuf_oneof:"reply"`
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated added in v0.3.6

func (*Reply) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetIp added in v0.3.6

func (x *Reply) GetIp() *IpResponse

func (*Reply) GetLatency added in v0.3.6

func (x *Reply) GetLatency() *durationpb.Duration

func (*Reply) GetReply added in v0.3.6

func (m *Reply) GetReply() isReply_Reply

func (*Reply) GetStun added in v0.3.7

func (x *Reply) GetStun() *StunResponse

func (*Reply) ProtoMessage added in v0.3.6

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect added in v0.3.6

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) Reset added in v0.3.6

func (x *Reply) Reset()

func (*Reply) String added in v0.3.6

func (x *Reply) String() string

type Reply_Ip added in v0.3.6

type Reply_Ip struct {
	Ip *IpResponse `protobuf:"bytes,2,opt,name=ip,proto3,oneof"`
}

type Reply_Latency added in v0.3.6

type Reply_Latency struct {
	Latency *durationpb.Duration `protobuf:"bytes,1,opt,name=latency,proto3,oneof"`
}

type Reply_Stun added in v0.3.7

type Reply_Stun struct {
	Stun *StunResponse `protobuf:"bytes,3,opt,name=stun,proto3,oneof"`
}

type Request

type Request struct {
	Id       string    `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Hash     string    `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Ipv6     bool      `protobuf:"varint,4,opt,name=ipv6,proto3" json:"ipv6,omitempty"`
	Protocol *Protocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetHash

func (x *Request) GetHash() string

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) GetIpv6 added in v0.3.5

func (x *Request) GetIpv6() bool

func (*Request) GetProtocol

func (x *Request) GetProtocol() *Protocol

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Requests

type Requests struct {
	Requests []*Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

func (*Requests) Descriptor deprecated

func (*Requests) Descriptor() ([]byte, []int)

Deprecated: Use Requests.ProtoReflect.Descriptor instead.

func (*Requests) GetRequests

func (x *Requests) GetRequests() []*Request

func (*Requests) ProtoMessage

func (*Requests) ProtoMessage()

func (*Requests) ProtoReflect

func (x *Requests) ProtoReflect() protoreflect.Message

func (*Requests) Reset

func (x *Requests) Reset()

func (*Requests) String

func (x *Requests) String() string

type Response

type Response struct {
	IdLatencyMap map[string]*Reply `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetIdLatencyMap

func (x *Response) GetIdLatencyMap() map[string]*Reply

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Stun added in v0.3.7

type Stun struct {
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Tcp  bool   `protobuf:"varint,2,opt,name=tcp,proto3" json:"tcp,omitempty"`
	// contains filtered or unexported fields
}

func (*Stun) Descriptor deprecated added in v0.3.7

func (*Stun) Descriptor() ([]byte, []int)

Deprecated: Use Stun.ProtoReflect.Descriptor instead.

func (*Stun) GetHost added in v0.3.7

func (x *Stun) GetHost() string

func (*Stun) GetTcp added in v0.3.7

func (x *Stun) GetTcp() bool

func (*Stun) ProtoMessage added in v0.3.7

func (*Stun) ProtoMessage()

func (*Stun) ProtoReflect added in v0.3.7

func (x *Stun) ProtoReflect() protoreflect.Message

func (*Stun) Reset added in v0.3.7

func (x *Stun) Reset()

func (*Stun) String added in v0.3.7

func (x *Stun) String() string

type StunResponse added in v0.3.7

type StunResponse struct {
	XorMappedAddress      string  `protobuf:"bytes,1,opt,name=xor_mapped_address,proto3" json:"xor_mapped_address,omitempty"`
	MappedAddress         string  `protobuf:"bytes,2,opt,name=mapped_address,proto3" json:"mapped_address,omitempty"`
	OtherAddress          string  `protobuf:"bytes,3,opt,name=other_address,proto3" json:"other_address,omitempty"`
	ResponseOriginAddress string  `protobuf:"bytes,4,opt,name=response_origin_address,proto3" json:"response_origin_address,omitempty"`
	Software              string  `protobuf:"bytes,5,opt,name=Software,proto3" json:"Software,omitempty"`
	Mapping               NatType `protobuf:"varint,6,opt,name=Mapping,json=mapping,proto3,enum=yuhaiin.latency.NatType" json:"Mapping,omitempty"`
	Filtering             NatType `protobuf:"varint,7,opt,name=Filtering,json=filtering,proto3,enum=yuhaiin.latency.NatType" json:"Filtering,omitempty"`
	// contains filtered or unexported fields
}

func (*StunResponse) Descriptor deprecated added in v0.3.7

func (*StunResponse) Descriptor() ([]byte, []int)

Deprecated: Use StunResponse.ProtoReflect.Descriptor instead.

func (*StunResponse) GetFiltering added in v0.3.7

func (x *StunResponse) GetFiltering() NatType

func (*StunResponse) GetMappedAddress added in v0.3.7

func (x *StunResponse) GetMappedAddress() string

func (*StunResponse) GetMapping added in v0.3.7

func (x *StunResponse) GetMapping() NatType

func (*StunResponse) GetOtherAddress added in v0.3.7

func (x *StunResponse) GetOtherAddress() string

func (*StunResponse) GetResponseOriginAddress added in v0.3.7

func (x *StunResponse) GetResponseOriginAddress() string

func (*StunResponse) GetSoftware added in v0.3.7

func (x *StunResponse) GetSoftware() string

func (*StunResponse) GetXorMappedAddress added in v0.3.7

func (x *StunResponse) GetXorMappedAddress() string

func (*StunResponse) ProtoMessage added in v0.3.7

func (*StunResponse) ProtoMessage()

func (*StunResponse) ProtoReflect added in v0.3.7

func (x *StunResponse) ProtoReflect() protoreflect.Message

func (*StunResponse) Reset added in v0.3.7

func (x *StunResponse) Reset()

func (*StunResponse) String added in v0.3.7

func (x *StunResponse) String() string

Jump to

Keyboard shortcuts

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