http

package
v0.30.25 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature(config ...func(*Installer)) miruken.Feature

Feature configures http client support

func Format

func Format(format string) miruken.Builder

Format returns a miruken.Builder requesting a specific format.

func Pipeline added in v0.28.0

func Pipeline(policies ...Policy) miruken.Builder

Pipeline returns a miruken.Builder that registers policies to apply during http request processing.

Types

type Installer

type Installer struct{}

Installer configure http client support.

func (*Installer) DependsOn

func (i *Installer) DependsOn() []miruken.Feature

func (*Installer) Install

func (i *Installer) Install(setup *miruken.SetupBuilder) error

type Options

type Options struct {
	Format      string
	ProcessPath string
	PublishPath string
	Pipeline    []Policy
}

Options customize http operations.

type Policy added in v0.28.0

type Policy func(
	req *http.Request,
	composer miruken.Handler,
	next func() (*http.Response, error),
) (*http.Response, error)

func Client added in v0.28.0

func Client(client *http.Client) Policy

Client returns a Policy to use the supplied http.Client. This should be the last Policy in the pipeline.

type Router

type Router struct{}

Router routes messages over a http transport.

func (*Router) Route

func (r *Router) Route(
	_ *struct {
		handles.It
		api.Routes `scheme:"http,https"`
	}, routed api.Routed,
	_ *struct {
		args.Optional
		args.FromOptions
	}, options Options,
	ctx miruken.HandleContext,
) *promise.Promise[any]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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