apihelper

package
v0.0.0-...-905ac89 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadGatewayStatus

func ReadGatewayStatus() (stats map[string]GatewayStatus)

ReadGatewayStatus returns information about all workers the addresses are read from WORKER_ADDRESSES, split using commas

func ReadProcessorStatus

func ReadProcessorStatus() (stats map[string]ProcessorStatus)

ReadProcessorStatus returns information about all workers the addresses are read from PROCESSOR_ADDRESSES, split using commas

func ReadWorkerStatus

func ReadWorkerStatus() (stats map[string]WorkerStatus)

ReadWorkerStatus returns information about all workers the addresses are read from WORKER_ADDRESSES, split using commas

Types

type GatewayEventInformation

type GatewayEventInformation struct {
	EventsDiscarded                int64
	EventsGuildCreate              int64
	EventsGuildUpdate              int64
	EventsGuildDelete              int64
	EventsGuildMemberAdd           int64
	EventsGuildMemberUpdate        int64
	EventsGuildMemberRemove        int64
	EventsGuildMembersChunk        int64
	EventsGuildRoleCreate          int64
	EventsGuildRoleUpdate          int64
	EventsGuildRoleDelete          int64
	EventsGuildEmojisUpdate        int64
	EventsChannelCreate            int64
	EventsChannelUpdate            int64
	EventsChannelDelete            int64
	EventsMessageCreate            int64
	EventsMessageUpdate            int64
	EventsMessageDelete            int64
	EventsPresenceUpdate           int64
	EventsChannelPinsUpdate        int64
	EventsGuildBanAdd              int64
	EventsGuildBanRemove           int64
	EventsMessageReactionAdd       int64
	EventsMessageReactionRemove    int64
	EventsMessageReactionRemoveAll int64
}

GatewayEventInformation contains information about the events received by a Gateway

type GatewayStatus

type GatewayStatus struct {
	Available bool
	Service   ServiceInformation
	Events    GatewayEventInformation
}

GatewayStatus contains information about a Gateway

func (GatewayStatus) Render

Render renders the WorkerStatus for a network response, required to satisfy Chi interface

type ProcessorStatus

type ProcessorStatus struct {
	Available bool
	Service   ServiceInformation
}

ProcessorStatus contains information about a Processor

func (ProcessorStatus) Render

Render renders the WorkerStatus for a network response, required to satisfy Chi interface

type ServiceInformation

type ServiceInformation struct {
	Heap       uint64
	Sys        uint64
	Coroutines int
	GC         uint64
	Launch     time.Time
	Go         string
}

ServiceInformation contains general information about a service

func GenerateServiceInformation

func GenerateServiceInformation() (information ServiceInformation)

GenerateServiceInformation generates general information about a go processor

type WorkerJobInformation

type WorkerJobInformation struct {
	Function string
	Next     time.Time
	Prev     time.Time
}

WorkerJobInformation contains information about one Job at a Worker

type WorkerStatus

type WorkerStatus struct {
	Available bool
	Entries   []WorkerJobInformation
	Service   ServiceInformation
}

WorkerStatus contains information about a Worker

func (WorkerStatus) Render

Render renders the WorkerStatus for a network response, required to satisfy Chi interface

Jump to

Keyboard shortcuts

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