Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.3 KiB

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package structs
// SystemMetadataOp is the operation for a request related to system metadata.
type SystemMetadataOp string
const (
SystemMetadataUpsert SystemMetadataOp = "upsert"
SystemMetadataDelete SystemMetadataOp = "delete"
)
// SystemMetadataRequest is used to upsert and delete system metadata.
type SystemMetadataRequest struct {
// Datacenter is the target for this request.
Datacenter string
// Op is the type of operation being requested.
Op SystemMetadataOp
// Entry is the key to modify.
Entry *SystemMetadataEntry
// WriteRequest is a common struct containing ACL tokens and other
// write-related common elements for requests.
WriteRequest
}
const (
SystemMetadataIntentionFormatKey = "intention-format"
SystemMetadataIntentionFormatConfigValue = "config-entry"
SystemMetadataIntentionFormatLegacyValue = "legacy"
SystemMetadataVirtualIPsEnabled = "virtual-ips"
SystemMetadataTermGatewayVirtualIPsEnabled = "virtual-ips-term-gateway"
)
type SystemMetadataEntry struct {
Key string
Value string `json:",omitempty"`
RaftIndex
}
// RequestDatacenter returns the datacenter for a given request.
func (c *SystemMetadataRequest) RequestDatacenter() string {
return c.Datacenter
}