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 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址