message

package
v0.0.0-...-51c4c77 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Type          string      `json:"type"`           //Type of message being sent
	Timestamp     int64       `json:"timestamp"`      //What time this message was created
	ContainerName string      `json:"container_name"` //Container Name we want to address
	Name          string      `json:"name"`           //Name of the event/action/container based on type
	ResponseCode  int         `json:"response_code"`  //Response code (might be nil based on type)
	Params        interface{} `json:"params"`         //Params attached to the event
	ID            string      `json:"id"`             //Message IDs for the clients to keep track of their messages (passed thru)
}

Message - handling message functions

func (*Message) MakeActionResponse

func (m *Message) MakeActionResponse(containerName string, actionName string, rc int)

MakeActionResponse -

func (*Message) MakeEmitEvent

func (m *Message) MakeEmitEvent(containerName string, eventName string, params interface{})

MakeEmitEvent -

func (*Message) MakeRegisterAction

func (m *Message) MakeRegisterAction(containerName string, actionName string)

MakeRegisterAction -

func (*Message) MakeRegisterContainer

func (m *Message) MakeRegisterContainer(containerName string)

MakeRegisterContainer -

func (*Message) MakeRegisterEvent

func (m *Message) MakeRegisterEvent(containerName string, eventName string)

MakeRegisterEvent -

Jump to

Keyboard shortcuts

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