mbus

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(c *config.Config, reconnected chan<- Signal) *nats.Conn

Types

type Client

type Client interface {
	Subscribe(subj string, cb nats.MsgHandler) (*nats.Subscription, error)
	Publish(subj string, data []byte) error
}

type Message

type Message struct {
	App                     string       `json:"app"`
	AvailabilityZone        string       `json:"availability_zone"`
	EndpointUpdatedAtNs     int64        `json:"endpoint_updated_at_ns"`
	Host                    string       `json:"host"`
	IsolationSegment        string       `json:"isolation_segment"`
	Port                    uint16       `json:"port"`
	PrivateInstanceID       string       `json:"private_instance_id"`
	PrivateInstanceIndex    string       `json:"private_instance_index"`
	Protocol                string       `json:"protocol"`
	RouteServiceURL         string       `json:"route_service_url"`
	ServerCertDomainSAN     string       `json:"server_cert_domain_san"`
	StaleThresholdInSeconds int          `json:"stale_threshold_in_seconds"`
	TLSPort                 uint16       `json:"tls_port"`
	Tags                    models.Tags  `json:"tags"`
	Uris                    []models.Uri `json:"uris"`
}

func CreateMessage

func CreateMessage(data []byte) (*Message, error)

func (*Message) MakeRoute

func (m *Message) MakeRoute(http2Enabled bool) (*models.Route, error)

func (*Message) ValidateMessage

func (m *Message) ValidateMessage() bool

ValidateMessage checks to ensure the message is valid

type Signal

type Signal struct{}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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