Versions in this module Expand all Collapse all v5 v5.0.1 Jun 25, 2024 v5.0.0 Jun 25, 2024 Changes in this version + var DefaultBufSizeH2 = 4 * 1024 * 1024 + func NewHTTPTransport(opts ...Option) *httpTransport + type Client interface + type DialOption func(*DialOptions) + func WithConnClose() DialOption + func WithInsecureSkipVerify(b bool) DialOption + func WithStream() DialOption + func WithTimeout(d time.Duration) DialOption + type DialOptions struct + ConnClose bool + Context context.Context + InsecureSkipVerify bool + Stream bool + Timeout time.Duration + type ListenOption func(*ListenOptions) + func NetListener(customListener net.Listener) ListenOption + type ListenOptions struct + Context context.Context + type Listener interface + Accept func(func(Socket)) error + Addr func() string + Close func() error + type Message struct + Body []byte + Header map[string]string + type Option func(*Options) + func Addrs(addrs ...string) Option + func BuffSizeH2(size int) Option + func Codec(c codec.Marshaler) Option + func Logger(l logger.Logger) Option + func Secure(b bool) Option + func TLSConfig(t *tls.Config) Option + func Timeout(t time.Duration) Option + type Options struct + Addrs []string + BuffSizeH2 int + Codec codec.Marshaler + Context context.Context + Logger logger.Logger + Secure bool + TLSConfig *tls.Config + Timeout time.Duration + type Socket interface + Close func() error + Local func() string + Recv func(*Message) error + Remote func() string + Send func(*Message) error + type Transport interface + Dial func(addr string, opts ...DialOption) (Client, error) + Init func(...Option) error + Listen func(addr string, opts ...ListenOption) (Listener, error) + Options func() Options + String func() string + var DefaultDialTimeout = time.Second * 5 + var DefaultTransport Transport = NewHTTPTransport() + func NewMemoryTransport(opts ...Option) Transport