bankSkynet

package
v0.0.0-...-82b07d1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler

MakeHandler returns a rest http handler. machine learning service can be set to nil if you do not want to store the requests

func NewRebuildCHefNodeCommand

func NewRebuildCHefNodeCommand(stateStore telegram.Store, chefStore chef.Store, telegram telegram.Service,
	alert alert.Service) telegram.Command

func NewRebuildChefNodeEnvironmentReplyCommandlet

func NewRebuildChefNodeEnvironmentReplyCommandlet(telegram telegram.Service, service Service,
	chefService chef.Service, store telegram.Store) telegram.Commandlet

func NewRebuildChefNodeExecute

func NewRebuildChefNodeExecute(skynet Service, alert alert.Service, store telegram.Store, service2 telegram.Service) telegram.Commandlet

func NewRebuildChefNodeRecipeReplyCommandlet

func NewRebuildChefNodeRecipeReplyCommandlet(store chef.Store, alert alert.Service,
	telegram telegram.Service) telegram.Commandlet

func NewRebuildNodeCommand

func NewRebuildNodeCommand(alertService alert.Service, skynetService Service, store telegram.Store, service2 telegram.Service) telegram.Command

Types

type Service

type Service interface {
	RecreateNode(ctx context.Context, chatid uint32, nodeName, callerName string) error
	// contains filtered or unexported methods
}

func NewInstrumentService

func NewInstrumentService(counter metrics.Counter, latency metrics.Histogram, s Service) Service

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(alert alert.Service, chefStore chef.Store, calloutService callout.Service) Service

type Skynet

type Skynet struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	Address  string
	Username string
	Password string
}

Skynet is a storage object for skynet data

type SkynetRebuildRequest

type SkynetRebuildRequest struct {
	NodeName string `json:"Nodename"`
	User     string `json:"User"`
}

type Store

type Store interface {
	/*
		AddSkynetEndpoint will add a skynet endpoint, or update if it already exists
	*/
	AddSkynetEndpoint(url, username, password string) error

	/*
		GetSkynetRecord will return the skynet record in the mongo DB, else throw an error if one doesnt exist.
	*/
	GetSkynetRecord() (Skynet, error)
}

Jump to

Keyboard shortcuts

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