Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegistryMessage ¶
type RegistryMessage struct {
Host string `json:"host"`
Port uint16 `json:"port"`
Uris []route.Uri `json:"uris"`
Tags map[string]string `json:"tags"`
App string `json:"app"`
StaleThresholdInSeconds int `json:"stale_threshold_in_seconds"`
RouteServiceURL string `json:"route_service_url"`
PrivateInstanceID string `json:"private_instance_id"`
PrivateInstanceIndex string `json:"private_instance_index"`
}
RegistryMessage defines the format of a route registration/unregistration
func (*RegistryMessage) ValidateMessage ¶
func (rm *RegistryMessage) ValidateMessage() bool
ValidateMessage checks to ensure the registry message is valid
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber subscribes to NATS for all router.* messages and handles them
func NewSubscriber ¶
func NewSubscriber( logger lager.Logger, natsClient *nats.Conn, routeRegistry registry.RegistryInterface, startMsgChan <-chan struct{}, opts *SubscriberOpts, ) *Subscriber
NewSubscriber returns a new Subscriber
type SubscriberOpts ¶
type SubscriberOpts struct {
ID string
MinimumRegisterIntervalInSeconds int
PruneThresholdInSeconds int
}
SubscriberOpts contains configuration for Subscriber struct
Click to show internal directories.
Click to hide internal directories.