controlpanel

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: MIT Imports: 6 Imported by: 9

Documentation

Overview

Copyright 2015 Factom Foundation Use of this source code is governed by the MIT license that can be found in the LICENSE file.

Adapted from tick-tock.go by Nirbhay Choubey http://nirbhay.in/2013/03/ajax-with-go/

Copyright 2015 Factom Foundation Use of this source code is governed by the MIT license that can be found in the LICENSE file.

Adapted from tick-tock.go by Nirbhay Choubey http://nirbhay.in/2013/03/ajax-with-go/

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CPEntry

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

We display what is going on now. cpEntry's are perged now and again.

type ControlPanel

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

func (*ControlPanel) AddUpdate

func (cp *ControlPanel) AddUpdate(tag string, cat string, title string, msg string, expire int)

func (*ControlPanel) GetPort

func (cp *ControlPanel) GetPort() string

func (*ControlPanel) GetTitle

func (cp *ControlPanel) GetTitle() string

func (*ControlPanel) LastCommunication

func (cp *ControlPanel) LastCommunication() time.Time

func (*ControlPanel) Purge

func (cp *ControlPanel) Purge()

Purge our lists of out of date info, warning, and error posts.

func (*ControlPanel) Run

func (cp *ControlPanel) Run()

func (*ControlPanel) SetPort

func (cp *ControlPanel) SetPort(port string)

func (*ControlPanel) SetTitle

func (cp *ControlPanel) SetTitle(title string)

func (*ControlPanel) Updates

func (cp *ControlPanel) Updates() []CPEntry

type IControlPanel

type IControlPanel interface {
	SetPort(string)
	GetPort() string
	SetTitle(string)
	GetTitle() string

	AddUpdate(tag string, cat string, title string, message string, seconds int) // show for int seconds
	Updates() []CPEntry

	Purge() // Purge system, status, info, warnings, and errors

	LastCommunication() time.Time
}

Jump to

Keyboard shortcuts

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