master

package
v0.0.0-...-44808bf Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package robot defines and implements the master robot interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
}

type Error

type Error struct {
	Msg string `json:"error"`
}

type Munbot

type Munbot interface {
	Configure(*Config, *wapp.Config) error
	Start() error
	Stop() error
	Running() bool
	ServeHTTP(http.ResponseWriter, *http.Request)
	CurrentState(string)
	ExitNotify(chan<- bool)
	Uptime() time.Duration
}

func New

func New() Munbot

type Robot

type Robot struct {
	*gobot.Master
	// contains filtered or unexported fields
}

func NewRobot

func NewRobot() *Robot

func (*Robot) Configure

func (m *Robot) Configure(c *Config, wc *wapp.Config) error

func (*Robot) CurrentState

func (m *Robot) CurrentState(s string)

func (*Robot) ExitNotify

func (m *Robot) ExitNotify(c chan<- bool)

func (*Robot) ServeHTTP

func (m *Robot) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Robot) Start

func (m *Robot) Start() error

func (*Robot) Stop

func (m *Robot) Stop() error

func (*Robot) Uptime

func (m *Robot) Uptime() time.Duration

type Status

type Status struct {
	Born   string `json:"born"`
	Uptime string `json:"uptime"`
	State  string `json:"state"`
	Status string `json:"status"`
	Error  string `json:"error,omitempty"`
	Die    string `json:"die,omitempty"`
}

Jump to

Keyboard shortcuts

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