monitor_pod

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

README

what

The monitor pod is a deployment in the k8s that runs some clients like get-unix-time

howto: deploy

docker build -t  gcr.io/fair-theater-238820/monitor_pod .	
docker push gcr.io/fair-theater-238820/monitor_pod 

kk apply -f deploy.yaml

howto: test locally

// knotfreeserver.com is localhost in /etc/hosts Can also use knotfree.net // just paste the whole thing into a terminal

nc knotfree.net 7465 C token "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTEyODUzMzMsImlzcyI6Il85c2giLCJqdGkiOiJTVnJTNUlBYy03eklyNDgxMU1JeEYydDkiLCJpbiI6MTAwMDAwMCwib3V0IjoxMDAwMDAwLCJzdSI6MjAwMDAwLCJjbyI6MjAwMDAwLCJ1cmwiOiJrbm90ZnJlZS5uZXQifQ.wXgyiPWM7xNnpL_Ihvs3reCsRKWZC0zqIVPrbMPe30h20vHpiBn8jbtw_mcAaHe3mJdCbXgXkY7u_nIgO7C7Cg" S myaddresstopicchannel P get-unix-time myaddresstopicchannel "get time"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GreenSquare = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68,
	82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243,
	255, 97, 0, 0, 0, 26, 73, 68, 65, 84, 120, 218, 99, 84, 106, 209,
	255, 207, 64, 1, 96, 28, 53, 96, 212, 128, 81, 3, 134, 139, 1, 0,
	239, 170, 29, 81, 139, 188, 27, 125, 0, 0, 0, 0, 73, 69, 78, 68,
	174, 66, 96, 130}

it's a green square PNG.

Functions

func PublishTestTopic

func PublishTestTopic(token string)

func ServeGetTime

func ServeGetTime(token string, c *ThingContext)

func SpecialPrint added in v0.2.4

func SpecialPrint(p *packets.PacketCommon, fn func())

func StartTempGetter

func StartTempGetter()

func Subscribe added in v0.2.4

func Subscribe(c *ThingContext, conn net.Conn) error

Types

type Command

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

func MakeCommand

func MakeCommand(commandString string, description string,
	argCount int, execute func(msg string, args []string) string,
	ourMap map[string]Command) Command

type ThingContext added in v0.2.5

type ThingContext struct {
	Topic string

	CommandMap map[string]Command
	Index      int
	Token      string

	IsSpecial bool
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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