Documentation
¶
Overview ¶
Package memory is an in-memory database used to store and retrieve HTTP servers
Index ¶
- type Repository
- func (r *Repository) Add(server http.Server) error
- func (r *Repository) Remove(id uuid.UUID)
- func (r *Repository) Server(id uuid.UUID) (http.Server, error)
- func (r *Repository) Servers() []http.Server
- func (r *Repository) SetOption(id uuid.UUID, option, value string) error
- func (r *Repository) Update(server http.Server) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is a structure that implements the Repository interface to store & manage Server objects
func NewRepository ¶
func NewRepository() *Repository
NewRepository is a factory to create and return a repository object to store and manage listeners
func (*Repository) Add ¶
func (r *Repository) Add(server http.Server) error
Add stores the passed in Server object
func (*Repository) Remove ¶
func (r *Repository) Remove(id uuid.UUID)
Remove deletes the Server object from the database
func (*Repository) Servers ¶
func (r *Repository) Servers() []http.Server
Servers returns a list of all the stored Server objects
Click to show internal directories.
Click to hide internal directories.