server

package
v0.0.0-...-a1a5cdc Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(inner http.Handler, name string) http.Handler

Logger creates a wrapper for inner and logs all requests made to that particular inner.

Types

type Router

type Router struct {
	*mux.Router
	// contains filtered or unexported fields
}

Router represents the segue router to send proper HTTP requests to the daemon.

func NewRouter

func NewRouter(daemon backend.SegueDaemonBackend) Router

NewRouter creates and returns a new router for the given backend.

type Server

type Server interface {
	Start() error
	Stop() error
}

Server listens for HTTP requests and sends them to our router.

func NewServer

func NewServer(socketPath string, daemon *daemon.Daemon) (Server, error)

NewServer returns a new Server that listens for requests in socketPath and sends them to daemon.

Jump to

Keyboard shortcuts

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