Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// Host or IP address of the endpoint.
Host string
// Port of the endpoint.
Port uint16
}
Endpoint represents a network endpoint (i.e., host or IP and a port).
type Export ¶
type Export struct {
// Name that will be used to identify the exported service in subsequent API calls.
// Furthermore, this name will be used by remote peers to identify it as an import source.
Name string
// Spec represents the attributes of the export service.
Spec ExportSpec
}
Export defines a service being exported by the local Peer for use by others. Only explicitly exported services can be accessed remotely.
type ExportSpec ¶
type ExportSpec struct {
// Service endpoint being exported. The service is located inside the cluster.
// In case of multi-port service, each export should
// have a different `Name`. The endpoint Host name could be different from Name,
// decoupling service names between Peers.
Service Endpoint
}
ExportSpec contains all the export service attributes.
type Import ¶
type Import struct {
// Name of service imported, matches exported name by remote peers providing
// the Service.
Name string
// Spec represents the attributes of the import service.
Spec ImportSpec
}
Import defines a service that is being imported to the local Peer from a remote Peer.
type ImportSpec ¶
type ImportSpec struct {
// Port of the imported service.
Port uint16
// TargetPort of the imported service.
// This is the internal (non user-facing) listening port used by the dataplane pods.
TargetPort uint16
// Peers to import from.
Peers []string
}
ImportSpec contains all the import service attributes.
type Peer ¶
type Peer struct {
// Name that will be used to identify the Peer in subsequent API calls.
Name string
// Spec represents the attributes of a peer.
Spec PeerSpec
// Status field contains the peer status observed by the gateway.
Status PeerStatus
}
Peer represents a location (or site) that can be used to import services from.
type PeerSpec ¶
type PeerSpec struct {
// Gateways serving the Peer.
Gateways []Endpoint
}
PeerSpec contains all the peer attributes.
type PeerStatus ¶
type PeerStatus struct {
// State contains the last peer state that observed by the gateway,
// indicating its reachability (Reachable/Unreachable).
State string
// LastSeen define the last time the state of the peer was updated.
LastSeen string
}
PeerStatus contains the peer status observed by the gateway.
type Policy ¶
type Policy struct {
// Name identifying the Policy instance.
Name string
// Spec represents the attributes of the policy.
Spec PolicySpec
}
Policy is an opaque object, to be processed by the Policy Engine.
type PolicySpec ¶
type PolicySpec struct {
// Blob of the policy (opaque bytes).
Blob []byte
}
PolicySpec contains all the policy attributes.