portforward

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForwardNotFound = registry.ErrForwardNotFound

Functions

func IsValidForwardID

func IsValidForwardID(id string) bool

IsValidForwardID enforces a DNS-safe label: - allowed: [a-z0-9-] - length: 1..48 - no leading/trailing '-'

It intentionally matches the control-plane validation to avoid subtle routing bugs.

func ParseTargetURL

func ParseTargetURL(targetURL string) (*url.URL, error)

Types

type CreateForwardRequest

type CreateForwardRequest struct {
	Target             string `json:"target"`
	Name               string `json:"name"`
	Description        string `json:"description"`
	HealthPath         string `json:"health_path"`
	InsecureSkipVerify bool   `json:"insecure_skip_verify"`
}

type Service

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

func New

func New(reg *registry.Registry) (*Service, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) CreateForward

func (s *Service) CreateForward(ctx context.Context, req CreateForwardRequest) (*registry.Forward, error)

func (*Service) DeleteForward

func (s *Service) DeleteForward(ctx context.Context, forwardID string) error

func (*Service) GetForward

func (s *Service) GetForward(ctx context.Context, forwardID string) (*registry.Forward, error)

func (*Service) ListForwards

func (s *Service) ListForwards(ctx context.Context) ([]registry.Forward, error)

func (*Service) TouchLastOpened

func (s *Service) TouchLastOpened(ctx context.Context, forwardID string) (*registry.Forward, error)

func (*Service) UpdateForward

func (s *Service) UpdateForward(ctx context.Context, forwardID string, req UpdateForwardRequest) (*registry.Forward, error)

type UpdateForwardRequest

type UpdateForwardRequest struct {
	Target             *string `json:"target,omitempty"`
	Name               *string `json:"name,omitempty"`
	Description        *string `json:"description,omitempty"`
	HealthPath         *string `json:"health_path,omitempty"`
	InsecureSkipVerify *bool   `json:"insecure_skip_verify,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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