mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 02:17:36 +00:00
ipn/ipnlocal: add VIPServices hash to return body of vip-services c2n endpoint
This commit updates the return body of c2n endpoint /vip-services to keep hash generation logic on client side. Updates tailscale/corp#24510 Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
This commit is contained in:
@@ -102,3 +102,18 @@ type C2NTLSCertInfo struct {
|
||||
// TODO(bradfitz): add fields for whether an ACME fetch is currently in
|
||||
// process and when it started, etc.
|
||||
}
|
||||
|
||||
// C2NVIPServicesResponse is the response (from node to control) from the
|
||||
// /vip-services handler.
|
||||
//
|
||||
// It returns the list of VIPServices that the node is currently serving with
|
||||
// their port info and whether they are active or not. It also returns a hash of
|
||||
// the response to allow the control server to detect changes.
|
||||
type C2NVIPServicesResponse struct {
|
||||
// VIPServices is the list of VIP services that the node is currently serving.
|
||||
VIPServices []*VIPService `json:",omitempty"`
|
||||
|
||||
// ServicesHash is the hash of VIPServices to allow the control server to detect
|
||||
// changes. This value matches what is reported in latest [Hostinfo.ServicesHash].
|
||||
ServicesHash string
|
||||
}
|
||||
|
Reference in New Issue
Block a user