httpserver

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

HttpServer is a Lassie server for fetching data from the network via HTTP

func NewHttpServer

func NewHttpServer(ctx context.Context, lassie *lassie.Lassie, address string, port uint) (*HttpServer, error)

NewHttpServer creates a new HttpServer

func (HttpServer) Addr

func (s HttpServer) Addr() string

Addr returns the listening address of the server

func (*HttpServer) Close

func (s *HttpServer) Close() error

Close shutsdown the server and cancels the server context

func (*HttpServer) Start

func (s *HttpServer) Start() error

Start starts the http server, returning an error if the server failed to start

Jump to

Keyboard shortcuts

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