phocus_api

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Zlib Imports: 8 Imported by: 1

README

Worklow Status

phocus_api

Documentation

Overview

Package phocus_api is the wrapper for the http and queueing api

Index

Constants

This section is empty.

Variables

View Source
var Queue = []phocus_messages.Message{
	{ID: uuid.New(), Command: "QID", Payload: ""},
}

Queue of messages seeded with QID to run at startup

View Source
var QueueMutex sync.Mutex

Functions

func DeleteMessage

func DeleteMessage(c *gin.Context)

DeleteMessage attempts to delete a specified message from the Queue

func DeleteQueue

func DeleteQueue(c *gin.Context)

DeleteQueue clears the current Queue

func GetHealth

func GetHealth(c *gin.Context)

GetHealth is a simple endpoint to return a 200

func GetMessage

func GetMessage(c *gin.Context)

GetMessage attempts to select a specified message from the Queue and returns it or fails

func GetQueue

func GetQueue(c *gin.Context)

GetQueue is called to view the current Queue as JSON

func PostMessage

func PostMessage(c *gin.Context)

PostMessage enQueues a new message manually (requires knowledge of commands and a generated uuid on the request)

func QueueQPGSn

func QueueQPGSn()

QueueQPGSn is a simple loop to add QPGSn to the Queue as long as it isn't too long

func SetupRouter

func SetupRouter() *gin.Engine

SetupRouter add the endpoints on the router for Queue management

Types

This section is empty.

Jump to

Keyboard shortcuts

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