portallocator

package
v0.0.0-...-d7c47dd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocatePortsParams

type AllocatePortsParams struct {
	Count   uint   `json:"count"`
	Network string `json:"network"`
}

type AllocatedPortRange

type AllocatedPortRange struct {
	From  uint `json:"from"`
	Count uint `json:"count"`
}

type AllowedPorts

type AllowedPorts struct {
	From uint `json:"from"`
	To   uint `json:"to"`
}

func (AllowedPorts) IsAllowed

func (a AllowedPorts) IsAllowed(pr AllocatedPortRange) bool

type PortAllocator

type PortAllocator struct{}

func (*PortAllocator) AllocatePortRange

func (p *PortAllocator) AllocatePortRange(ctx restate.ObjectContext, params AllocatePortsParams) (*AllocatedPortRange, error)

func (*PortAllocator) FreePortsForNetwork

func (p *PortAllocator) FreePortsForNetwork(ctx restate.ObjectContext, network string) error

func (*PortAllocator) Initialize

func (p *PortAllocator) Initialize(ctx restate.ObjectContext, allowedPorts AllowedPorts) error

Jump to

Keyboard shortcuts

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