listen

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: BSD-2-Clause Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Jitter

func Jitter(mul int) time.Duration

Return a random duration from -1s to +1s

func RetryingWatch

func RetryingWatch(
	target string, header http.Header, finish <-chan struct{},
) (<-chan []byte, <-chan error)

This function is like Watch() except if the transport fails, it is automatically retried.

func Watch

func Watch(
	target string, header http.Header, finish <-chan struct{},
) (<-chan []byte, <-chan error, error)

Types

type ErrConnectionFail

type ErrConnectionFail struct {
	// contains filtered or unexported fields
}

func (*ErrConnectionFail) Error

func (e *ErrConnectionFail) Error() string

type Message

type Message struct {
	*http.Request
}

func (Message) MarshalJSON

func (r Message) MarshalJSON() ([]byte, error)

func (Message) Payload

func (m Message) Payload() ([]byte, error)

Read out the full request body and replace it with a buffer

func (*Message) UnmarshalJSON

func (r *Message) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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