Documentation ¶
Index ¶
- func Do(ctx context.Context, method Method, target string, opts ...CliOptionFunc) ([]byte, error)
- func GetDefaultHttpClient() *http.Client
- func Serve(ctx context.Context, addr string, handle http.Handler, opts ...SrvOptionFunc) error
- type CliOptionFunc
- func WithCliBody(body []byte) CliOptionFunc
- func WithCliHeader(header map[string]string) CliOptionFunc
- func WithCliLogger(logger log.API) CliOptionFunc
- func WithCliQuery(query map[string]string) CliOptionFunc
- func WithCliRetry(retry int) CliOptionFunc
- func WithCliTrace(trace bool) CliOptionFunc
- func WithCliUniqueId(uniqueId string) CliOptionFunc
- func WithClient(client *http.Client) CliOptionFunc
- type Method
- type SrvOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultHttpClient ¶ added in v0.0.31
Types ¶
type CliOptionFunc ¶ added in v0.0.46
type CliOptionFunc func(*cliConfig)
func WithCliBody ¶ added in v0.0.31
func WithCliBody(body []byte) CliOptionFunc
func WithCliHeader ¶ added in v0.0.31
func WithCliHeader(header map[string]string) CliOptionFunc
func WithCliLogger ¶ added in v0.0.31
func WithCliLogger(logger log.API) CliOptionFunc
func WithCliQuery ¶ added in v0.0.31
func WithCliQuery(query map[string]string) CliOptionFunc
func WithCliRetry ¶ added in v0.0.31
func WithCliRetry(retry int) CliOptionFunc
func WithCliTrace ¶ added in v0.0.31
func WithCliTrace(trace bool) CliOptionFunc
func WithCliUniqueId ¶ added in v0.0.31
func WithCliUniqueId(uniqueId string) CliOptionFunc
func WithClient ¶
func WithClient(client *http.Client) CliOptionFunc
type SrvOptionFunc ¶ added in v0.0.46
type SrvOptionFunc func(*srvCfg)
func WithSrvLogger ¶ added in v0.0.31
func WithSrvLogger(logger log.API) SrvOptionFunc
Click to show internal directories.
Click to hide internal directories.