internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWSMessage added in v0.5.0

func DecodeWSMessage(bytes []byte, msg proto.Message) error

func WriteWSMessage added in v0.5.0

func WriteWSMessage(conn *websocket.Conn, msg proto.Message) error

Types

type NopLogger

type NopLogger struct{}

func (*NopLogger) Debugf

func (l *NopLogger) Debugf(format string, v ...interface{})

func (*NopLogger) Errorf

func (l *NopLogger) Errorf(format string, v ...interface{})

type OptionalDuration

type OptionalDuration struct {
	Duration time.Duration
	// true if duration field is defined.
	Defined bool
}

func ExtractRetryAfterHeader

func ExtractRetryAfterHeader(resp *http.Response) OptionalDuration

ExtractRetryAfterHeader extracts Retry-After response header if the status is 503 or 429. Returns 0 duration if the header is not found or the status is different.

Directories

Path Synopsis
examples module
tools module

Jump to

Keyboard shortcuts

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