relay

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultWorkerURL = "https://remote.osauer.dev"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Run(ctx context.Context)
	Status() Status
	PairingURL(raw string) string
}

type Noop

type Noop struct {
	PublicURL string
}

func (Noop) PairingURL added in v1.8.0

func (n Noop) PairingURL(raw string) string

func (Noop) Run added in v1.8.0

func (n Noop) Run(context.Context)

func (Noop) Status

func (n Noop) Status() Status

type RouteRegistration added in v1.14.0

type RouteRegistration struct {
	RouteID        string
	PublicURL      string
	ConnectorURL   string
	ConnectorToken string
	ExpiresAt      time.Time
}

type Status

type Status struct {
	Mode      string `json:"mode"`
	URL       string `json:"url,omitempty"`
	Connected bool   `json:"connected"`
	Message   string `json:"message,omitempty"`
}

type Worker added in v1.8.0

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

func NewWorker added in v1.8.0

func NewWorker(ctx context.Context, opts WorkerOptions) (*Worker, error)

func (*Worker) PairingURL added in v1.8.0

func (w *Worker) PairingURL(raw string) string

func (*Worker) PublicURL added in v1.8.0

func (w *Worker) PublicURL() string

func (*Worker) Run added in v1.8.0

func (w *Worker) Run(ctx context.Context)

func (*Worker) Status added in v1.8.0

func (w *Worker) Status() Status

type WorkerOptions added in v1.8.0

type WorkerOptions struct {
	BaseURL              string
	OriginURL            string
	Version              string
	HTTPClient           *http.Client
	ResumeRouteID        string
	ResumeConnectorToken string
	OnRoute              func(RouteRegistration) error
}

Jump to

Keyboard shortcuts

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