api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listen   string
	LogLevel string
}

type Driver

type Driver interface {
	LaunchTask(*mesos.Task) error
	KillTask(string, string) error

	ClusterName() string

	SubscribeEvent(http.ResponseWriter, string) error
	TaskEvents() []*types.TaskEvent
}

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request)

type Middleware

type Middleware interface {
	Name() string

	WrapHandler(HandlerFunc) HandlerFunc
}

type Route

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

func NewRoute

func NewRoute(method, path string, handler HandlerFunc) *Route

func (*Route) Handler

func (r *Route) Handler() HandlerFunc

func (*Route) Method

func (r *Route) Method() string

func (*Route) Path

func (r *Route) Path() string

type Router

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

func NewRouter

func NewRouter(d Driver, s Store) *Router

func (*Router) Routes

func (r *Router) Routes() []*Route

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *Config) *Server

func (*Server) InstallRouter

func (s *Server) InstallRouter(r *Router)

func (*Server) Reload

func (s *Server) Reload() error

func (*Server) Run

func (s *Server) Run() error

func (*Server) Shutdown

func (s *Server) Shutdown() error

gracefully shutdown.

func (*Server) Stop

func (s *Server) Stop() error

func (*Server) Update

func (s *Server) Update(leader string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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