http

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package http implements a http-like hap server to handle requests and responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port      string
	Context   hap.Context
	Database  db.Database
	Container *accessory.Container
	Device    hap.SecuredDevice
	Mutex     *sync.Mutex
	Emitter   event.Emitter
}

type Server

type Server struct {
	Mux *http.ServeMux
	// contains filtered or unexported fields
}

func NewServer

func NewServer(c Config) *Server

NewServer returns a server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

func (*Server) Port

func (s *Server) Port() string

Jump to

Keyboard shortcuts

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