messages

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MessageKindDeregister funcie.MessageKind = "DEREGISTER"

MessageKindDeregister is a deregistration request to a server bastion.

View Source
const MessageKindForwardRequest = "FORWARD_REQUEST"

MessageKindForwardRequest is the kind of a message that is used to forward an application request.

View Source
const MessageKindPing funcie.MessageKind = "PING"

MessageKindPing is a request to validate whether a client is still alive. This can be used for both clients and bastions.

View Source
const MessageKindRegister funcie.MessageKind = "REGISTER"

MessageKindRegister is a registration request to a server bastion.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeregistrationMessage

type DeregistrationMessage = funcie.MessageBase[DeregistrationRequestPayload]

DeregistrationMessage is a message containing a deregistration request.

type DeregistrationRequestPayload

type DeregistrationRequestPayload struct {
	// Name is the name of the application.
	Name string `json:"name"`
}

DeregistrationRequestPayload is a deregistration request.

func NewDeregistrationRequestPayload

func NewDeregistrationRequestPayload(name string) *DeregistrationRequestPayload

NewDeregistrationRequestPayload creates a new DeregistrationRequestPayload with the given name.

type DeregistrationResponse

type DeregistrationResponse = funcie.ResponseBase[DeregistrationResponsePayload]

DeregistrationResponse is a message containing a deregistration response.

type DeregistrationResponsePayload

type DeregistrationResponsePayload struct {
}

DeregistrationResponsePayload is a response to a deregistration request.

func NewDeregistrationResponsePayload

func NewDeregistrationResponsePayload() *DeregistrationResponsePayload

NewDeregistrationResponsePayload creates a new DeregistrationResponsePayload.

type ForwardRequestMessage

type ForwardRequestMessage = funcie.MessageBase[ForwardRequestPayload]

ForwardRequestMessage is a message containing an invocation request.

type ForwardRequestPayload

type ForwardRequestPayload struct {
	Body json.RawMessage `json:"body"`
}

ForwardRequestPayload is the payload for an invocation message.

func NewForwardRequestPayload

func NewForwardRequestPayload(body json.RawMessage) *ForwardRequestPayload

NewForwardRequestPayload creates a new ForwardRequestPayload with the given body.

type ForwardRequestResponse

type ForwardRequestResponse = funcie.ResponseBase[ForwardRequestResponsePayload]

ForwardRequestResponse is a message containing an invocation response.

type ForwardRequestResponsePayload

type ForwardRequestResponsePayload struct {
	Body json.RawMessage `json:"body"`
}

ForwardRequestResponsePayload is the payload for an invocation response.

func NewForwardRequestResponsePayload

func NewForwardRequestResponsePayload(body json.RawMessage) *ForwardRequestResponsePayload

NewForwardRequestResponsePayload creates a new ForwardRequestResponsePayload with the given body.

type PingMessage

type PingMessage = funcie.MessageBase[PingRequestPayload]

PingMessage is a message containing a ping request.

type PingRequestPayload

type PingRequestPayload struct{}

PingRequestPayload is a ping request.

func NewPingRequestPayload

func NewPingRequestPayload() *PingRequestPayload

NewPingRequestPayload creates a new PingRequestPayload.

type PingResponse

type PingResponse = funcie.ResponseBase[PingResponsePayload]

PingResponse is a message containing a ping response.

type PingResponsePayload

type PingResponsePayload struct{}

PingResponsePayload is a response to a ping request.

func NewPingResponsePayload

func NewPingResponsePayload() *PingResponsePayload

NewPingResponsePayload creates a new PingResponsePayload.

type RegistrationMessage

type RegistrationMessage = funcie.MessageBase[RegistrationRequestPayload]

RegistrationMessage is a message containing a registration request.

type RegistrationRequestPayload

type RegistrationRequestPayload struct {
	// Name is the name of the application.
	Name string `json:"name"`
	// Endpoint is the address to send requests to.
	Endpoint funcie.Endpoint `json:"endpoint"`
}

func NewRegistrationRequestPayload

func NewRegistrationRequestPayload(name string, endpoint funcie.Endpoint) *RegistrationRequestPayload

NewRegistrationRequestPayload creates a new RegistrationRequestPayload with the given name and endpoint.

type RegistrationResponse

type RegistrationResponse = funcie.ResponseBase[RegistrationResponsePayload]

RegistrationResponse is a message containing a registration response.

type RegistrationResponsePayload

type RegistrationResponsePayload struct {
	// RegistrationId is a unique ID that can be used to deregister the application.
	// For now, this is unused.
	RegistrationId uuid.UUID
}

RegistrationResponsePayload is a response to a registration request.

func NewRegistrationResponsePayload

func NewRegistrationResponsePayload(registrationId uuid.UUID) *RegistrationResponsePayload

NewRegistrationResponsePayload creates a new RegistrationResponsePayload with the given registration ID.

Jump to

Keyboard shortcuts

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