Documentation ¶
Index ¶
- func CreateClientTLSConfig(clientCert *tls.Certificate, caCertPath string) (*tls.Config, error)
- func CreateServerTLSConfig(caCertPath, serverCertPath, serverKeyPath string) (*tls.Config, error)
- func CreateTLSCert(caCertPath, caKeyPath string) (*protobufs.TLSCertificate, error)
- func DecodeWSMessage(bytes []byte, msg proto.Message) error
- func WriteWSMessage(conn *websocket.Conn, msg proto.Message) error
- type NopLogger
- type OptionalDuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClientTLSConfig ¶ added in v0.10.0
func CreateServerTLSConfig ¶ added in v0.10.0
func CreateTLSCert ¶ added in v0.10.0
func CreateTLSCert(caCertPath, caKeyPath string) (*protobufs.TLSCertificate, error)
func DecodeWSMessage ¶ added in v0.5.0
DecodeWSMessage decodes a websocket message as bytes into a proto.Message.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.