websocket

package
v0.0.0-...-c0bc5af Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumerHandler

func ConsumerHandler(c *gin.Context)

func ProducerHandler

func ProducerHandler(c *gin.Context)

func Run

func Run(ctx Context)

Types

type Action

type Action struct {
	ServiceName string  `json:"serviceName,omitempty"`
	Action      string  `json:"action"`
	Payload     Payload `json:"payload"`
	Status      string  `json:"status,omitempty"`
	ReturnTime  string  `json:"returnTime,omitempty"`
}

type Context

type Context struct {
	Mode string
	Port string
}

type Message

type Message struct {
	Meta    Meta     `json:"meta"`
	Actions []Action `json:"actions"`
}

type Meta

type Meta struct {
	Caller     string `json:"caller"`
	Callee     string `json:"callee"`
	CallTime   string `json:"callTime"`
	ReturnTime string `json:"returnTime,omitempty"`
}

type Payload

type Payload struct {
	ServiceName string   `json:"serviceName,omitempty"`
	Actions     []Action `json:"actions,omitempty"`
	Key         string   `json:"key,omitempty"`
	Value       string   `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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