delegator

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package delegator provides the ipfs-orchestrator's network routing functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine manages request delegation

func New

func New(l *zap.SugaredLogger, version string, timeout time.Duration, jwtKey []byte,
	reg *registry.NodeRegistry, networks temporal.PrivateNetworks) *Engine

New instantiates a new delegator engine

func (*Engine) NetworkContext

func (e *Engine) NetworkContext(next http.Handler) http.Handler

NetworkContext creates a handler that injects relevant network context into all incoming requests through URL parameters

func (*Engine) NetworkStatus

func (e *Engine) NetworkStatus(w http.ResponseWriter, r *http.Request)

NetworkStatus reports on the status of a network

func (*Engine) Redirect

func (e *Engine) Redirect(w http.ResponseWriter, r *http.Request)

Redirect manages request redirects

func (*Engine) Run

func (e *Engine) Run(ctx context.Context, opts config.Delegator) error

Run spins up a server that listens for requests and proxies them appropriately

func (*Engine) Status

func (e *Engine) Status(w http.ResponseWriter, r *http.Request)

Status reports on proxy status

Jump to

Keyboard shortcuts

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