Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a helper for services to interact with the governance manager
func NewClient ¶
func NewClient(config *ClientConfig) *Client
NewClient creates a new governance client
func (*Client) Register ¶
func (c *Client) Register(registration *models.ServiceRegistration) error
Register registers this service with the manager
func (*Client) Unregister ¶
Unregister unregisters this service from the manager
func (*Client) UnregisterService ¶
UnregisterService unregisters a specific service/pod from the manager
type ClientConfig ¶
type ClientConfig struct {
ManagerURL string // Manager URL (e.g., "http://manager:8080")
ServiceName string // This service's name
PodName string // This pod's name
Timeout time.Duration // HTTP request timeout
}
ClientConfig contains configuration for the client
type NotificationHandler ¶
type NotificationHandler func(payload *models.NotificationPayload)
NotificationHandler is a function type for handling notifications
type NotificationServer ¶
type NotificationServer struct {
// contains filtered or unexported fields
}
NotificationServer helps services receive notifications from the manager
func NewNotificationServer ¶
func NewNotificationServer(port int, handler NotificationHandler) *NotificationServer
NewNotificationServer creates a new notification server
func (*NotificationServer) GetHealthCheckURL ¶
func (ns *NotificationServer) GetHealthCheckURL(host string) string
GetHealthCheckURL returns the health check URL for this server
func (*NotificationServer) GetNotificationURL ¶
func (ns *NotificationServer) GetNotificationURL(host string) string
GetNotificationURL returns the notification URL for this server
func (*NotificationServer) Start ¶
func (ns *NotificationServer) Start() error
Start starts the notification server