backendaction

package
v0.0.0-...-294dc8c Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActionRoute is used to mark the connection to be usable for a route to an
	// action (called action_route or internal_action_route in the backend).
	ActionRoute = "action"

	// MigrationsRoute is used to mark the connection to be usable for a route
	// to the migrations handler.
	MigrationsRoute = "migrations"

	// HealthRoute is used to mark the connection to be usable for a route to
	// the backend with a health request.
	HealthRoute = "health"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	URL *url.URL
	// contains filtered or unexported fields
}

Conn holds a connection to the backend action service.

func New

func New(url *url.URL, pw []byte, route string) *Conn

New returns a new connection to the backend action service.

func (*Conn) Health

func (c *Conn) Health(ctx context.Context) (json.RawMessage, error)

Health sends the health request to the backend.

func (*Conn) Migrations

func (c *Conn) Migrations(ctx context.Context, command string) (json.RawMessage, error)

Migrations sends the given migrations command to the backend.

func (*Conn) Single

func (c *Conn) Single(ctx context.Context, name string, data json.RawMessage) (json.RawMessage, error)

Single sends a request to backend action service with a single action.

Jump to

Keyboard shortcuts

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