tools

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const AdminAccount = ".admin"

Variables

View Source
var DB_NAME = "andrewd.db"
View Source
var RING_LOCK_DIR = "ringUpdateLock"

Functions

func NewAdmin

func NewAdmin(serverconf conf.Config, flags *flag.FlagSet, cnf srv.ConfigLoader) (ipPort *srv.IpPort, server srv.Server, logger srv.LowLevelLogger, err error)

func NewDriveWatch

func NewDriveWatch(logger srv.LowLevelLogger,
	metricsScope tally.Scope, serverconf conf.Config, cnf srv.ConfigLoader, certFile, keyFile string) *driveWatch

func Nodes

func Nodes(flags *flag.FlagSet, cnf srv.ConfigLoader)

func ObjectInfo

func ObjectInfo(flags *flag.FlagSet, cnf srv.ConfigLoader)

func PrintDevs

func PrintDevs(devs []*ring.RingBuilderDevice)

func ReconClient

func ReconClient(flags *flag.FlagSet, cnf srv.ConfigLoader) bool

func RingBuildCmd

func RingBuildCmd(flags *flag.FlagSet)

Types

type AutoAdmin

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

func (*AutoAdmin) Background

func (server *AutoAdmin) Background(flags *flag.FlagSet) chan struct{}

func (*AutoAdmin) Finalize

func (server *AutoAdmin) Finalize()

func (*AutoAdmin) GetHandler

func (server *AutoAdmin) GetHandler(config conf.Config, metricsPrefix string) http.Handler

func (*AutoAdmin) HealthcheckHandler

func (server *AutoAdmin) HealthcheckHandler(writer http.ResponseWriter, request *http.Request)

func (*AutoAdmin) LogRequest

func (server *AutoAdmin) LogRequest(next http.Handler) http.Handler

func (*AutoAdmin) Run

func (a *AutoAdmin) Run()

func (*AutoAdmin) RunForever

func (a *AutoAdmin) RunForever()

func (*AutoAdmin) Type

func (server *AutoAdmin) Type() string

type ReportData

type ReportData struct {
	TotalDevices      int
	TotalWeight       float64
	LastSuccessfulRun time.Time
	UnmountedDevices  []ReportDevice
	LastRingZeroes    []ReportDevice
}

type ReportDevice

type ReportDevice struct {
	Ip         string
	Port       int
	Device     string
	Weight     float64
	Mounted    bool
	Reachable  bool
	LastUpdate time.Time
}

Jump to

Keyboard shortcuts

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