Documentation ¶
Overview ¶
Package net provides net functionality for grpc
Index ¶
- Variables
- func IsIPv4(addr string) bool
- func IsIPv6(addr string) bool
- func IsLocal(host string) bool
- func LoadLocalIP() string
- func Parse(addr string) (host string, port uint16, isIP bool, err error)
- func ScanPorts(ctx context.Context, start, end uint16, host string) (ports []uint16, err error)
- func SplitHostPort(hostport string) (host string, port uint16, err error)
- type Conn
- type Dialer
- type ListenConfig
- type Listener
- type Resolver
Constants ¶
This section is empty.
Variables ¶
var DefaultResolver = net.DefaultResolver
DefaultResolver is an alias of net.DefaultResolver.
Functions ¶
func LoadLocalIP ¶ added in v1.0.0
func LoadLocalIP() string
func Parse ¶
Parse parses the hostname, IPv4 or IPv6 address and return the hostname/IP, port number, whether the address is IP, and any parsing error occurred. The address should contains the port number, otherwise an error will return.
func ScanPorts ¶
ScanPorts scans the given range of port numbers from the host (inclusively), and return the list of ports that can be connected through TCP, or any error occurred.
func SplitHostPort ¶
SplitHostPort splits the address, and return the host/IP address and the port number, and any error occurred. If it is the loopback address, it will return the loopback address and corresponding port number. IPv6 loopback address is not supported yet. For more information, please read https://github.com/vdaas/vald/projects/3#card-43504189
Types ¶
type ListenConfig ¶
type ListenConfig = net.ListenConfig
ListenConfig is an alias of net.ListenConfig.
Directories ¶
Path | Synopsis |
---|---|
Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc
|
Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc Package grpc provides generic functionality for grpc |
codes
Package codes provides status codes of grpc
|
Package codes provides status codes of grpc |
credentials
Package credentials provides generic functionality for grpc credentials setting
|
Package credentials provides generic functionality for grpc credentials setting |
errdetails
Package errdetails provides error detail for grpc status
|
Package errdetails provides error detail for grpc status |
interceptor/server/logging
Package logging provides gRPC interceptors for access logging
|
Package logging provides gRPC interceptors for access logging |
interceptor/server/recover
Package recover provides gRPC interceptors for recovery
|
Package recover provides gRPC interceptors for recovery |
interceptor/server/trace
Package trace provides gRPC interceptors for traces
|
Package trace provides gRPC interceptors for traces |
keepalive
Package keepalive provides grpc keepalive configuration
|
Package keepalive provides grpc keepalive configuration |
metric
Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc
|
Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc |
pool
Package pool provides grpc connection pool client Package pool provides grpc connection pool client
|
Package pool provides grpc connection pool client Package pool provides grpc connection pool client |
proto
Package proto provides proto file logic
|
Package proto provides proto file logic |
status
Package status provides statuses and errors returned by grpc handler functions
|
Package status provides statuses and errors returned by grpc handler functions |
types
Package types provides alias of protobuf library types
|
Package types provides alias of protobuf library types |
http
|
|
dump
Package dump provides http request/response dump logic
|
Package dump provides http request/response dump logic |
metrics
Package metrics provides pprof profiler handler
|
Package metrics provides pprof profiler handler |
middleware
Package middleware provides rest.Func Middleware Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package middleware provides rest.Func Middleware
|
Package middleware provides rest.Func Middleware Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package middleware provides rest.Func Middleware |
rest
Package rest provides REST API common logic & variable
|
Package rest provides REST API common logic & variable |
routing
Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func
|
Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func Package routing provides implementation of Go API for routing http Handler wrapped by rest.Func |
transport
Package transport provides http transport roundtrip option Package transport provides http transport roundtrip option
|
Package transport provides http transport roundtrip option Package transport provides http transport roundtrip option |
Package tcp provides tcp option Package tcp provides tcp option Package tcp provides tcp option
|
Package tcp provides tcp option Package tcp provides tcp option Package tcp provides tcp option |