cl

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPPort  = 80
	HTTPSPort = 443
)

Variables

This section is empty.

Functions

func MustObserve

func MustObserve()

Types

type AlertMapper added in v1.9.0

type AlertMapper = func(context.Context, alert.Alert) error

type BodyParser

type BodyParser = func(context.Context, []byte, []byte)

type Client

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

func HostGenerator added in v1.1.0

func HostGenerator(stage, module string, port uint32) *Client

func New

func New(module, host string, port uint32, tls bool) *Client

func (*Client) Request

func (c *Client) Request(
	ctx context.Context,
	method,
	path string,
	modifiers ...any,
) error

type ClientError

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

func (ClientError) Alerts

func (e ClientError) Alerts() alert.Alerts

func (ClientError) Error

func (e ClientError) Error() string

func (ClientError) Status

func (e ClientError) Status() int

func (ClientError) Unwrap

func (e ClientError) Unwrap() error

type HTTPError

type HTTPError interface {
	Error() string
	Alerts() alert.Alerts
	Status() int
}

type HeaderParser added in v1.1.0

type HeaderParser = func(context.Context, *fasthttp.ResponseHeader)

type JSONArrayParser added in v1.11.6

type JSONArrayParser = func(context.Context, *jsoniter.Iterator)

type JSONError

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

func (JSONError) Alert

func (e JSONError) Alert() alert.Alert

func (JSONError) Error

func (e JSONError) Error() string

func (JSONError) IsRecoverable

func (e JSONError) IsRecoverable() bool

func (JSONError) Unwrap

func (e JSONError) Unwrap() error

type JSONObjectParser added in v1.11.6

type JSONObjectParser = func(context.Context, *jsoniter.Iterator, string)

type NetError

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

func (NetError) Error

func (e NetError) Error() string

func (NetError) IsRecoverable

func (e NetError) IsRecoverable() bool

func (NetError) Unwrap

func (e NetError) Unwrap() error

type RequestModifier

type RequestModifier = func(context.Context, *fasthttp.Request) error

func WithStream

func WithStream(stream *jsoniter.Stream) RequestModifier

type ServerError

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

func (ServerError) Alerts

func (e ServerError) Alerts() alert.Alerts

func (ServerError) Error

func (e ServerError) Error() string

func (ServerError) Status

func (e ServerError) Status() int

func (ServerError) Unwrap

func (e ServerError) Unwrap() error

type URIModifier

type URIModifier = func(context.Context, *fasthttp.URI) error

func WithPathSubstr

func WithPathSubstr(subs ...any) URIModifier

Jump to

Keyboard shortcuts

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