Nexus: github.com/RTradeLtd/Nexus/delegator Index | Files

package delegator

import "github.com/RTradeLtd/Nexus/delegator"

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

Index

Package Files

auth.go cache.go context.go doc.go engine.go proxy.go

type Engine Uses

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

Engine manages request delegation

func New Uses

func New(l *zap.SugaredLogger, opts EngineOpts,
    reg *registry.NodeRegistry, networks temporal.PrivateNetworks) *Engine

New instantiates a new delegator engine

func (*Engine) FeaturePathContext Uses

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

FeaturePathContext creates a handler that injects relevant feature context into all incoming requests through URL parameters

func (*Engine) NetworkAndFeatureSubdomainContext Uses

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

NetworkAndFeatureSubdomainContext creates a handler that injects relevant network context into all incoming requests through what is in the subdomain

func (*Engine) NetworkPathContext Uses

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

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

func (*Engine) NetworkStatus Uses

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

NetworkStatus reports on the status of a network

func (*Engine) Redirect Uses

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

Redirect manages request redirects

func (*Engine) Run Uses

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 Uses

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

Status reports on proxy status

type EngineOpts Uses

type EngineOpts struct {
    Version string
    DevMode bool
    Domain  string

    RequestTimeout time.Duration
    JWTKey         []byte
}

EngineOpts denotes options for the delegator engine

Package delegator imports 22 packages (graph) and is imported by 1 packages. Updated 2019-06-02. Refresh now. Tools for package owners.