service

package
v0.0.0-...-2996f3e Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(constructor plugin.Constructor[Service]) error

Register a new instance of a storage plugin

func Start

func Start(proxy Proxy) error

Types

type HttpServerProxy

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

func (*HttpServerProxy) Forward

func (p *HttpServerProxy) Forward(ctx context.Context, req *http.Request) (*http.Response, error)

func (*HttpServerProxy) Host

func (p *HttpServerProxy) Host() string

type Proxy

type Proxy interface {
	Forward(ctx context.Context, req *http.Request) (*http.Response, error)
	Host() string
}

func NewHttpServerProxy

func NewHttpServerProxy(target string) Proxy

type Service

type Service interface {
	Start(Proxy) error
}

Jump to

Keyboard shortcuts

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