adapter

package
v0.0.0-...-80b0eab Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryPortsRepository

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

InMemoryPortsRepository allows to store Ports in memory with a hashmap data structure. It is safe for concurrent use.

func NewInMemoryPortsRepository

func NewInMemoryPortsRepository() *InMemoryPortsRepository

NewInMemoryPortsRepository creates a new repository.

func (*InMemoryPortsRepository) ListPorts

func (r *InMemoryPortsRepository) ListPorts(_ context.Context) ([]ports.Port, error)

ListPorts lists all ports stored in memory.

func (*InMemoryPortsRepository) StorePort

func (r *InMemoryPortsRepository) StorePort(_ context.Context, port *ports.Port) error

StorePort stores given port in memory.

Jump to

Keyboard shortcuts

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