Documentation ¶
Overview ¶
Package pipy implements utility routines related to Pipy proxy, and models an instance of a proxy to be able to generate XDS configurations for it.
Index ¶
- func NewNetAddress(address string) net.Addr
- type NetAddr
- type Proxy
- func (p *Proxy) GetAddr() string
- func (p *Proxy) GetCNPrefix() string
- func (p *Proxy) GetConnectedAt() time.Time
- func (p *Proxy) GetIP() net.Addr
- func (p *Proxy) GetIdentity() identity.ServiceIdentity
- func (p *Proxy) GetName() string
- func (p *Proxy) GetUUID() uuid.UUID
- func (p *Proxy) HasMetadata() bool
- func (p *Proxy) Kind() models.ProxyKind
- func (p *Proxy) MetadataString() string
- func (p *Proxy) StatsHeaders() map[string]string
- func (p *Proxy) String() string
- type ProxyMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetAddress ¶
NewNetAddress creates a new net.Addr
Types ¶
type NetAddr ¶
type NetAddr struct {
// contains filtered or unexported fields
}
NetAddr represents a network end point address.
The two methods Network and String conventionally return strings that can be passed as the arguments to Dial, but the exact form and meaning of the strings is up to the implementation.
type Proxy ¶
type Proxy struct { // UUID of the proxy uuid.UUID Identity identity.ServiceIdentity net.Addr // Records metadata around the Kubernetes Pod on which this Sidecar Proxy is installed. // This could be nil if the Sidecar is not operating in a Kubernetes cluster (VM for example) // NOTE: This field may be not be set at the time Proxy struct is initialized. This would // eventually be set when the metadata arrives via the xDS protocol. Metadata *ProxyMetadata MeshConf *configurator.Configurator SidecarCert *certificate.Certificate // The version of Pipy Repo Codebase ETag uint64 Mutex *sync.RWMutex Quit chan bool ID uint64 VM bool MachineIP net.Addr ClusterID string // contains filtered or unexported fields }
Proxy is a representation of an Sidecar proxy . This should at some point have a 1:1 match to an Endpoint (which is a member of a meshed service).
func NewProxy ¶
func NewProxy(kind models.ProxyKind, uuid uuid.UUID, svcIdentity identity.ServiceIdentity, vm bool, ip net.Addr) *Proxy
NewProxy creates a new instance of an Sidecar proxy connected to the servers.
func (*Proxy) GetCNPrefix ¶
GetCNPrefix returns a newly generated CommonName for a certificate of the form: <ProxyUUID>.<kind>.<identity> where identity itself is of the form <name>.<namespace>
func (*Proxy) GetConnectedAt ¶
GetConnectedAt returns the timestamp of when the given proxy connected to the control plane.
func (*Proxy) GetIdentity ¶
func (p *Proxy) GetIdentity() identity.ServiceIdentity
GetIdentity returns ServiceIdentity.
func (*Proxy) GetName ¶
GetName returns a unique name for this proxy based on the identity and uuid.
func (*Proxy) HasMetadata ¶ added in v1.2.0
HasMetadata answers the question - has the Pod metadata been recorded for the given Sidecar proxy
func (*Proxy) MetadataString ¶ added in v1.2.0
MetadataString returns relevant pod metadata as a string
func (*Proxy) StatsHeaders ¶
StatsHeaders returns the headers required for SMI metrics
type ProxyMetadata ¶ added in v1.2.0
type ProxyMetadata struct { UID string Name string Namespace string IP string ServiceAccount identity.K8sServiceAccount CreationTime time.Time Cluster string SidecarNodeID string WorkloadKind string WorkloadName string ReadinessProbes []*v1.Probe LivenessProbes []*v1.Probe StartupProbes []*v1.Probe }
ProxyMetadata is a struct holding information on the Pod/VM on which a given Sidecar proxy is installed This struct is initialized *eventually*, when the metadata arrives via xDS.
Directories ¶
Path | Synopsis |
---|---|
Package bootstrap implements functionality related to Pipy's bootstrap config.
|
Package bootstrap implements functionality related to Pipy's bootstrap config. |
Package client implements the PipyRepo struct.
|
Package client implements the PipyRepo struct. |
Package driver implements debugger's methods.
|
Package driver implements debugger's methods. |
Package registry implements handler's methods.
|
Package registry implements handler's methods. |
Package repo implements broadcast's methods.
|
Package repo implements broadcast's methods. |