Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFQDNDataServer(s grpc.ServiceRegistrar, srv FQDNDataServer)
- type DNSPolicy
- func (*DNSPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *DNSPolicy) GetDnsPattern() []string
- func (x *DNSPolicy) GetDnsServers() []*DNSServer
- func (x *DNSPolicy) GetSourceEndpointId() uint32
- func (msg *DNSPolicy) MarshalJSON() ([]byte, error)
- func (*DNSPolicy) ProtoMessage()
- func (x *DNSPolicy) ProtoReflect() protoreflect.Message
- func (x *DNSPolicy) Reset()
- func (x *DNSPolicy) String() string
- func (msg *DNSPolicy) UnmarshalJSON(b []byte) error
- type DNSResponseData
- func (*DNSResponseData) Descriptor() ([]byte, []int)deprecated
- func (x *DNSResponseData) GetAnswerTypes() []uint32
- func (x *DNSResponseData) GetCnames() []string
- func (x *DNSResponseData) GetIsResponse() bool
- func (x *DNSResponseData) GetQtypes() []uint32
- func (msg *DNSResponseData) MarshalJSON() ([]byte, error)
- func (*DNSResponseData) ProtoMessage()
- func (x *DNSResponseData) ProtoReflect() protoreflect.Message
- func (x *DNSResponseData) Reset()
- func (x *DNSResponseData) String() string
- func (msg *DNSResponseData) UnmarshalJSON(b []byte) error
- type DNSServer
- func (*DNSServer) Descriptor() ([]byte, []int)deprecated
- func (x *DNSServer) GetDnsServerIdentity() uint32
- func (x *DNSServer) GetDnsServerPort() uint32
- func (x *DNSServer) GetDnsServerProto() uint32
- func (msg *DNSServer) MarshalJSON() ([]byte, error)
- func (*DNSServer) ProtoMessage()
- func (x *DNSServer) ProtoReflect() protoreflect.Message
- func (x *DNSServer) Reset()
- func (x *DNSServer) String() string
- func (msg *DNSServer) UnmarshalJSON(b []byte) error
- type EndpointInfo
- func (*EndpointInfo) Descriptor() ([]byte, []int)deprecated
- func (x *EndpointInfo) GetId() uint64
- func (x *EndpointInfo) GetIp() [][]byte
- func (msg *EndpointInfo) MarshalJSON() ([]byte, error)
- func (*EndpointInfo) ProtoMessage()
- func (x *EndpointInfo) ProtoReflect() protoreflect.Message
- func (x *EndpointInfo) Reset()
- func (x *EndpointInfo) String() string
- func (msg *EndpointInfo) UnmarshalJSON(b []byte) error
- type FQDNDataClient
- type FQDNDataServer
- type FQDNData_StreamPolicyStateClient
- type FQDNData_StreamPolicyStateServer
- type FQDNMapping
- func (*FQDNMapping) Descriptor() ([]byte, []int)deprecated
- func (x *FQDNMapping) GetFqdn() string
- func (x *FQDNMapping) GetMetricsData() *MetricsData
- func (x *FQDNMapping) GetRecordIp() [][]byte
- func (x *FQDNMapping) GetResponseCode() uint32
- func (x *FQDNMapping) GetSourceIdentity() uint32
- func (x *FQDNMapping) GetSourceIp() []byte
- func (x *FQDNMapping) GetTtl() uint32
- func (msg *FQDNMapping) MarshalJSON() ([]byte, error)
- func (*FQDNMapping) ProtoMessage()
- func (x *FQDNMapping) ProtoReflect() protoreflect.Message
- func (x *FQDNMapping) Reset()
- func (x *FQDNMapping) String() string
- func (msg *FQDNMapping) UnmarshalJSON(b []byte) error
- type IdentityToEndpointMapping
- func (*IdentityToEndpointMapping) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityToEndpointMapping) GetEndpointInfo() []*EndpointInfo
- func (x *IdentityToEndpointMapping) GetIdentity() uint32
- func (msg *IdentityToEndpointMapping) MarshalJSON() ([]byte, error)
- func (*IdentityToEndpointMapping) ProtoMessage()
- func (x *IdentityToEndpointMapping) ProtoReflect() protoreflect.Message
- func (x *IdentityToEndpointMapping) Reset()
- func (x *IdentityToEndpointMapping) String() string
- func (msg *IdentityToEndpointMapping) UnmarshalJSON(b []byte) error
- type IdentityToPrefixMapping
- func (*IdentityToPrefixMapping) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityToPrefixMapping) GetIdentity() uint32
- func (x *IdentityToPrefixMapping) GetPrefix() [][]byte
- func (msg *IdentityToPrefixMapping) MarshalJSON() ([]byte, error)
- func (*IdentityToPrefixMapping) ProtoMessage()
- func (x *IdentityToPrefixMapping) ProtoReflect() protoreflect.Message
- func (x *IdentityToPrefixMapping) Reset()
- func (x *IdentityToPrefixMapping) String() string
- func (msg *IdentityToPrefixMapping) UnmarshalJSON(b []byte) error
- type MetricsData
- func (*MetricsData) Descriptor() ([]byte, []int)deprecated
- func (x *MetricsData) GetAllowed() bool
- func (x *MetricsData) GetDnsResponseData() *DNSResponseData
- func (x *MetricsData) GetErrorMessage() string
- func (x *MetricsData) GetErrorType() ProxyErrorType
- func (x *MetricsData) GetProcessingStats() *ProcessingStats
- func (x *MetricsData) GetProtocol() string
- func (x *MetricsData) GetServerAddr() string
- func (x *MetricsData) GetServerIdentity() uint32
- func (x *MetricsData) GetSourcePort() uint32
- func (msg *MetricsData) MarshalJSON() ([]byte, error)
- func (*MetricsData) ProtoMessage()
- func (x *MetricsData) ProtoReflect() protoreflect.Message
- func (x *MetricsData) Reset()
- func (x *MetricsData) String() string
- func (msg *MetricsData) UnmarshalJSON(b []byte) error
- type PolicyState
- func (*PolicyState) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyState) GetEgressL7DnsPolicy() []*DNSPolicy
- func (x *PolicyState) GetIdentityToEndpointMapping() []*IdentityToEndpointMapping
- func (x *PolicyState) GetIdentityToPrefixMapping() []*IdentityToPrefixMapping
- func (x *PolicyState) GetRequestId() string
- func (msg *PolicyState) MarshalJSON() ([]byte, error)
- func (*PolicyState) ProtoMessage()
- func (x *PolicyState) ProtoReflect() protoreflect.Message
- func (x *PolicyState) Reset()
- func (x *PolicyState) String() string
- func (msg *PolicyState) UnmarshalJSON(b []byte) error
- type PolicyStateResponse
- func (*PolicyStateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyStateResponse) GetRequestId() string
- func (x *PolicyStateResponse) GetResponse() ResponseCode
- func (msg *PolicyStateResponse) MarshalJSON() ([]byte, error)
- func (*PolicyStateResponse) ProtoMessage()
- func (x *PolicyStateResponse) ProtoReflect() protoreflect.Message
- func (x *PolicyStateResponse) Reset()
- func (x *PolicyStateResponse) String() string
- func (msg *PolicyStateResponse) UnmarshalJSON(b []byte) error
- type ProcessingStats
- func (*ProcessingStats) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessingStats) GetPolicyCheckTimeNs() int64
- func (x *ProcessingStats) GetProcessingTimeNs() int64
- func (x *ProcessingStats) GetSemaphoreAcquireTimeNs() int64
- func (x *ProcessingStats) GetTotalTimeNs() int64
- func (x *ProcessingStats) GetUpstreamTimeNs() int64
- func (msg *ProcessingStats) MarshalJSON() ([]byte, error)
- func (*ProcessingStats) ProtoMessage()
- func (x *ProcessingStats) ProtoReflect() protoreflect.Message
- func (x *ProcessingStats) Reset()
- func (x *ProcessingStats) String() string
- func (msg *ProcessingStats) UnmarshalJSON(b []byte) error
- type ProxyErrorType
- func (ProxyErrorType) Descriptor() protoreflect.EnumDescriptor
- func (x ProxyErrorType) Enum() *ProxyErrorType
- func (ProxyErrorType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProxyErrorType) Number() protoreflect.EnumNumber
- func (x ProxyErrorType) String() string
- func (ProxyErrorType) Type() protoreflect.EnumType
- type ResponseCode
- func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseCode) Enum() *ResponseCode
- func (ResponseCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseCode) Number() protoreflect.EnumNumber
- func (x ResponseCode) String() string
- func (ResponseCode) Type() protoreflect.EnumType
- type UnimplementedFQDNDataServer
- type UnsafeFQDNDataServer
- type UpdateMappingResponse
- func (*UpdateMappingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateMappingResponse) GetResponse() ResponseCode
- func (msg *UpdateMappingResponse) MarshalJSON() ([]byte, error)
- func (*UpdateMappingResponse) ProtoMessage()
- func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateMappingResponse) Reset()
- func (x *UpdateMappingResponse) String() string
- func (msg *UpdateMappingResponse) UnmarshalJSON(b []byte) error
Constants ¶
const ( FQDNData_StreamPolicyState_FullMethodName = "/standalonednsproxy.FQDNData/StreamPolicyState" FQDNData_UpdateMappingRequest_FullMethodName = "/standalonednsproxy.FQDNData/UpdateMappingRequest" )
Variables ¶
var ( ResponseCode_name = map[int32]string{ 0: "RESPONSE_CODE_UNSPECIFIED", 1: "RESPONSE_CODE_NO_ERROR", 2: "RESPONSE_CODE_FORMAT_ERROR", 3: "RESPONSE_CODE_SERVER_FAILURE", 4: "RESPONSE_CODE_NOT_IMPLEMENTED", 6: "RESPONSE_CODE_ERROR_INVALID_ARGUMENT", 5: "RESPONSE_CODE_ERROR_ENDPOINT_NOT_FOUND", 7: "RESPONSE_CODE_REFUSED", } ResponseCode_value = map[string]int32{ "RESPONSE_CODE_UNSPECIFIED": 0, "RESPONSE_CODE_NO_ERROR": 1, "RESPONSE_CODE_FORMAT_ERROR": 2, "RESPONSE_CODE_SERVER_FAILURE": 3, "RESPONSE_CODE_NOT_IMPLEMENTED": 4, "RESPONSE_CODE_ERROR_INVALID_ARGUMENT": 6, "RESPONSE_CODE_ERROR_ENDPOINT_NOT_FOUND": 5, "RESPONSE_CODE_REFUSED": 7, } )
Enum value maps for ResponseCode.
var ( ProxyErrorType_name = map[int32]string{ 0: "PROXY_ERROR_TYPE_NONE", 1: "PROXY_ERROR_TYPE_PROXY", 2: "PROXY_ERROR_TYPE_TIMEOUT", 3: "PROXY_ERROR_TYPE_SEMAPHORE_FAILED", 4: "PROXY_ERROR_TYPE_SEMAPHORE_TIMED_OUT", } ProxyErrorType_value = map[string]int32{ "PROXY_ERROR_TYPE_NONE": 0, "PROXY_ERROR_TYPE_PROXY": 1, "PROXY_ERROR_TYPE_TIMEOUT": 2, "PROXY_ERROR_TYPE_SEMAPHORE_FAILED": 3, "PROXY_ERROR_TYPE_SEMAPHORE_TIMED_OUT": 4, } )
Enum value maps for ProxyErrorType.
var FQDNData_ServiceDesc = grpc.ServiceDesc{ ServiceName: "standalonednsproxy.FQDNData", HandlerType: (*FQDNDataServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateMappingRequest", Handler: _FQDNData_UpdateMappingRequest_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamPolicyState", Handler: _FQDNData_StreamPolicyState_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "standalone-dns-proxy/standalone-dns-proxy.proto", }
FQDNData_ServiceDesc is the grpc.ServiceDesc for FQDNData service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_standalone_dns_proxy_standalone_dns_proxy_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFQDNDataServer ¶
func RegisterFQDNDataServer(s grpc.ServiceRegistrar, srv FQDNDataServer)
Types ¶
type DNSPolicy ¶
type DNSPolicy struct {
SourceEndpointId uint32 `protobuf:"varint,1,opt,name=source_endpoint_id,json=sourceEndpointId,proto3" json:"source_endpoint_id,omitempty"` // Endpoint ID of the workload this L7 DNS policy should apply to
DnsPattern []string `protobuf:"bytes,2,rep,name=dns_pattern,json=dnsPattern,proto3" json:"dns_pattern,omitempty"` // Allowed DNS pattern this identity is allowed to resolve.
DnsServers []*DNSServer `protobuf:"bytes,3,rep,name=dns_servers,json=dnsServers,proto3" json:"dns_servers,omitempty"` // List of DNS servers to be allowed to connect.
// contains filtered or unexported fields
}
L7 DNS policy specifying which requests are permitted to which DNS server
func (*DNSPolicy) Descriptor
deprecated
func (*DNSPolicy) GetDnsPattern ¶
func (*DNSPolicy) GetDnsServers ¶
func (*DNSPolicy) GetSourceEndpointId ¶
func (*DNSPolicy) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*DNSPolicy) ProtoMessage ¶
func (*DNSPolicy) ProtoMessage()
func (*DNSPolicy) ProtoReflect ¶
func (x *DNSPolicy) ProtoReflect() protoreflect.Message
func (*DNSPolicy) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type DNSResponseData ¶ added in v1.20.0
type DNSResponseData struct {
IsResponse bool `protobuf:"varint,1,opt,name=is_response,json=isResponse,proto3" json:"is_response,omitempty"` // Whether this is a DNS response (true) or request (false)
Cnames []string `protobuf:"bytes,2,rep,name=cnames,proto3" json:"cnames,omitempty"` // CNAME records from the DNS response
Qtypes []uint32 `protobuf:"varint,3,rep,packed,name=qtypes,proto3" json:"qtypes,omitempty"` // DNS question types
AnswerTypes []uint32 `protobuf:"varint,4,rep,packed,name=answer_types,json=answerTypes,proto3" json:"answer_types,omitempty"` // DNS answer record types
// contains filtered or unexported fields
}
DNSResponseData holds the DNS message details extracted from the response that are needed for access logging on the agent side.
func (*DNSResponseData) Descriptor
deprecated
added in
v1.20.0
func (*DNSResponseData) Descriptor() ([]byte, []int)
Deprecated: Use DNSResponseData.ProtoReflect.Descriptor instead.
func (*DNSResponseData) GetAnswerTypes ¶ added in v1.20.0
func (x *DNSResponseData) GetAnswerTypes() []uint32
func (*DNSResponseData) GetCnames ¶ added in v1.20.0
func (x *DNSResponseData) GetCnames() []string
func (*DNSResponseData) GetIsResponse ¶ added in v1.20.0
func (x *DNSResponseData) GetIsResponse() bool
func (*DNSResponseData) GetQtypes ¶ added in v1.20.0
func (x *DNSResponseData) GetQtypes() []uint32
func (*DNSResponseData) MarshalJSON ¶ added in v1.20.0
func (msg *DNSResponseData) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*DNSResponseData) ProtoMessage ¶ added in v1.20.0
func (*DNSResponseData) ProtoMessage()
func (*DNSResponseData) ProtoReflect ¶ added in v1.20.0
func (x *DNSResponseData) ProtoReflect() protoreflect.Message
func (*DNSResponseData) Reset ¶ added in v1.20.0
func (x *DNSResponseData) Reset()
func (*DNSResponseData) String ¶ added in v1.20.0
func (x *DNSResponseData) String() string
func (*DNSResponseData) UnmarshalJSON ¶ added in v1.20.0
func (msg *DNSResponseData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type DNSServer ¶
type DNSServer struct {
DnsServerIdentity uint32 `protobuf:"varint,1,opt,name=dns_server_identity,json=dnsServerIdentity,proto3" json:"dns_server_identity,omitempty"` // Identity of destination DNS server
DnsServerPort uint32 `protobuf:"varint,2,opt,name=dns_server_port,json=dnsServerPort,proto3" json:"dns_server_port,omitempty"`
DnsServerProto uint32 `protobuf:"varint,3,opt,name=dns_server_proto,json=dnsServerProto,proto3" json:"dns_server_proto,omitempty"`
// contains filtered or unexported fields
}
DNServer identity, port and protocol the requests be allowed to
func (*DNSServer) Descriptor
deprecated
func (*DNSServer) GetDnsServerIdentity ¶
func (*DNSServer) GetDnsServerPort ¶
func (*DNSServer) GetDnsServerProto ¶
func (*DNSServer) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*DNSServer) ProtoMessage ¶
func (*DNSServer) ProtoMessage()
func (*DNSServer) ProtoReflect ¶
func (x *DNSServer) ProtoReflect() protoreflect.Message
func (*DNSServer) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type EndpointInfo ¶
type EndpointInfo struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Ip [][]byte `protobuf:"bytes,2,rep,name=ip,proto3" json:"ip,omitempty"`
// contains filtered or unexported fields
}
cilium endpoint ipaddress and ID
func (*EndpointInfo) Descriptor
deprecated
func (*EndpointInfo) Descriptor() ([]byte, []int)
Deprecated: Use EndpointInfo.ProtoReflect.Descriptor instead.
func (*EndpointInfo) GetId ¶
func (x *EndpointInfo) GetId() uint64
func (*EndpointInfo) GetIp ¶
func (x *EndpointInfo) GetIp() [][]byte
func (*EndpointInfo) MarshalJSON ¶
func (msg *EndpointInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*EndpointInfo) ProtoMessage ¶
func (*EndpointInfo) ProtoMessage()
func (*EndpointInfo) ProtoReflect ¶
func (x *EndpointInfo) ProtoReflect() protoreflect.Message
func (*EndpointInfo) Reset ¶
func (x *EndpointInfo) Reset()
func (*EndpointInfo) String ¶
func (x *EndpointInfo) String() string
func (*EndpointInfo) UnmarshalJSON ¶
func (msg *EndpointInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type FQDNDataClient ¶
type FQDNDataClient interface {
// StreamPolicyState is used by the Standalone DNS proxy to get the current policy state.
// Policy state includes the DNS policies and the identity to IP mapping.
// Cilium agent will stream DNS policies state to Standalone DNS proxy.
// In case of any client side error, cilium agent will cancel the stream and SDP will have to re-subscribe.
// In case of any server side error, cilium agent will send an error response and SDP will have to re-subscribe.
StreamPolicyState(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[PolicyStateResponse, PolicyState], error)
// UpdateMappingRequest is used by the Standalone DNS proxy to update ciliium agent with FQDN-IP mappings which in turn update L3/L4 policy maps.
// In case of any error, SDP will either retry the connection if the error is server side or will error out.
// Note: In case of concurrent updates, since this is called in a callback(notifyDNSMsg) from the DNS server it follows the same behavior as
// the inbuilt dns proxy in cilium.
UpdateMappingRequest(ctx context.Context, in *FQDNMapping, opts ...grpc.CallOption) (*UpdateMappingResponse, error)
}
FQDNDataClient is the client API for FQDNData service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Cilium agent runs the FQDNData service and Standalone DNS proxy connects to it to get the DNS Policy rules. Standalone DNS proxy sends FQDN-IP mapping updates to Cilium Agent. CFP: https://github.com/cilium/design-cfps/pull/54
func NewFQDNDataClient ¶
func NewFQDNDataClient(cc grpc.ClientConnInterface) FQDNDataClient
type FQDNDataServer ¶
type FQDNDataServer interface {
// StreamPolicyState is used by the Standalone DNS proxy to get the current policy state.
// Policy state includes the DNS policies and the identity to IP mapping.
// Cilium agent will stream DNS policies state to Standalone DNS proxy.
// In case of any client side error, cilium agent will cancel the stream and SDP will have to re-subscribe.
// In case of any server side error, cilium agent will send an error response and SDP will have to re-subscribe.
StreamPolicyState(grpc.BidiStreamingServer[PolicyStateResponse, PolicyState]) error
// UpdateMappingRequest is used by the Standalone DNS proxy to update ciliium agent with FQDN-IP mappings which in turn update L3/L4 policy maps.
// In case of any error, SDP will either retry the connection if the error is server side or will error out.
// Note: In case of concurrent updates, since this is called in a callback(notifyDNSMsg) from the DNS server it follows the same behavior as
// the inbuilt dns proxy in cilium.
UpdateMappingRequest(context.Context, *FQDNMapping) (*UpdateMappingResponse, error)
}
FQDNDataServer is the server API for FQDNData service. All implementations should embed UnimplementedFQDNDataServer for forward compatibility.
Cilium agent runs the FQDNData service and Standalone DNS proxy connects to it to get the DNS Policy rules. Standalone DNS proxy sends FQDN-IP mapping updates to Cilium Agent. CFP: https://github.com/cilium/design-cfps/pull/54
type FQDNData_StreamPolicyStateClient ¶
type FQDNData_StreamPolicyStateClient = grpc.BidiStreamingClient[PolicyStateResponse, PolicyState]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FQDNData_StreamPolicyStateServer ¶
type FQDNData_StreamPolicyStateServer = grpc.BidiStreamingServer[PolicyStateResponse, PolicyState]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FQDNMapping ¶
type FQDNMapping struct {
Fqdn string `protobuf:"bytes,1,opt,name=fqdn,proto3" json:"fqdn,omitempty"` // dns name
RecordIp [][]byte `protobuf:"bytes,2,rep,name=record_ip,json=recordIp,proto3" json:"record_ip,omitempty"` // List of IPs corresponding to dns name
Ttl uint32 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"` // TTL of DNS record
SourceIdentity uint32 `protobuf:"varint,4,opt,name=source_identity,json=sourceIdentity,proto3" json:"source_identity,omitempty"` // Identity of the client making the DNS request
SourceIp []byte `protobuf:"bytes,5,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` // IP address of the client making the DNS request
ResponseCode uint32 `protobuf:"varint,6,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` // DNS Response code as specified in RFC2316
MetricsData *MetricsData `protobuf:"bytes,7,opt,name=metrics_data,json=metricsData,proto3" json:"metrics_data,omitempty"` // Metrics and access logging data collected by the standalone DNS proxy.
// contains filtered or unexported fields
}
FQDN-IP mapping goalstate sent from SDP to agent
func (*FQDNMapping) Descriptor
deprecated
func (*FQDNMapping) Descriptor() ([]byte, []int)
Deprecated: Use FQDNMapping.ProtoReflect.Descriptor instead.
func (*FQDNMapping) GetFqdn ¶
func (x *FQDNMapping) GetFqdn() string
func (*FQDNMapping) GetMetricsData ¶ added in v1.20.0
func (x *FQDNMapping) GetMetricsData() *MetricsData
func (*FQDNMapping) GetRecordIp ¶
func (x *FQDNMapping) GetRecordIp() [][]byte
func (*FQDNMapping) GetResponseCode ¶
func (x *FQDNMapping) GetResponseCode() uint32
func (*FQDNMapping) GetSourceIdentity ¶
func (x *FQDNMapping) GetSourceIdentity() uint32
func (*FQDNMapping) GetSourceIp ¶
func (x *FQDNMapping) GetSourceIp() []byte
func (*FQDNMapping) GetTtl ¶
func (x *FQDNMapping) GetTtl() uint32
func (*FQDNMapping) MarshalJSON ¶
func (msg *FQDNMapping) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*FQDNMapping) ProtoMessage ¶
func (*FQDNMapping) ProtoMessage()
func (*FQDNMapping) ProtoReflect ¶
func (x *FQDNMapping) ProtoReflect() protoreflect.Message
func (*FQDNMapping) Reset ¶
func (x *FQDNMapping) Reset()
func (*FQDNMapping) String ¶
func (x *FQDNMapping) String() string
func (*FQDNMapping) UnmarshalJSON ¶
func (msg *FQDNMapping) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type IdentityToEndpointMapping ¶
type IdentityToEndpointMapping struct {
Identity uint32 `protobuf:"varint,1,opt,name=identity,proto3" json:"identity,omitempty"`
EndpointInfo []*EndpointInfo `protobuf:"bytes,2,rep,name=endpoint_info,json=endpointInfo,proto3" json:"endpoint_info,omitempty"`
// contains filtered or unexported fields
}
Cilium Identity ID to IP address mapping
func (*IdentityToEndpointMapping) Descriptor
deprecated
func (*IdentityToEndpointMapping) Descriptor() ([]byte, []int)
Deprecated: Use IdentityToEndpointMapping.ProtoReflect.Descriptor instead.
func (*IdentityToEndpointMapping) GetEndpointInfo ¶
func (x *IdentityToEndpointMapping) GetEndpointInfo() []*EndpointInfo
func (*IdentityToEndpointMapping) GetIdentity ¶
func (x *IdentityToEndpointMapping) GetIdentity() uint32
func (*IdentityToEndpointMapping) MarshalJSON ¶
func (msg *IdentityToEndpointMapping) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*IdentityToEndpointMapping) ProtoMessage ¶
func (*IdentityToEndpointMapping) ProtoMessage()
func (*IdentityToEndpointMapping) ProtoReflect ¶
func (x *IdentityToEndpointMapping) ProtoReflect() protoreflect.Message
func (*IdentityToEndpointMapping) Reset ¶
func (x *IdentityToEndpointMapping) Reset()
func (*IdentityToEndpointMapping) String ¶
func (x *IdentityToEndpointMapping) String() string
func (*IdentityToEndpointMapping) UnmarshalJSON ¶
func (msg *IdentityToEndpointMapping) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type IdentityToPrefixMapping ¶ added in v1.19.0
type IdentityToPrefixMapping struct {
Identity uint32 `protobuf:"varint,1,opt,name=identity,proto3" json:"identity,omitempty"`
Prefix [][]byte `protobuf:"bytes,2,rep,name=prefix,proto3" json:"prefix,omitempty"`
// contains filtered or unexported fields
}
Cilium Identity ID to IP prefix mapping
func (*IdentityToPrefixMapping) Descriptor
deprecated
added in
v1.19.0
func (*IdentityToPrefixMapping) Descriptor() ([]byte, []int)
Deprecated: Use IdentityToPrefixMapping.ProtoReflect.Descriptor instead.
func (*IdentityToPrefixMapping) GetIdentity ¶ added in v1.19.0
func (x *IdentityToPrefixMapping) GetIdentity() uint32
func (*IdentityToPrefixMapping) GetPrefix ¶ added in v1.19.0
func (x *IdentityToPrefixMapping) GetPrefix() [][]byte
func (*IdentityToPrefixMapping) MarshalJSON ¶ added in v1.19.0
func (msg *IdentityToPrefixMapping) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*IdentityToPrefixMapping) ProtoMessage ¶ added in v1.19.0
func (*IdentityToPrefixMapping) ProtoMessage()
func (*IdentityToPrefixMapping) ProtoReflect ¶ added in v1.19.0
func (x *IdentityToPrefixMapping) ProtoReflect() protoreflect.Message
func (*IdentityToPrefixMapping) Reset ¶ added in v1.19.0
func (x *IdentityToPrefixMapping) Reset()
func (*IdentityToPrefixMapping) String ¶ added in v1.19.0
func (x *IdentityToPrefixMapping) String() string
func (*IdentityToPrefixMapping) UnmarshalJSON ¶ added in v1.19.0
func (msg *IdentityToPrefixMapping) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type MetricsData ¶ added in v1.20.0
type MetricsData struct {
ProcessingStats *ProcessingStats `protobuf:"bytes,1,opt,name=processing_stats,json=processingStats,proto3" json:"processing_stats,omitempty"` // Proxy request processing timing statistics
DnsResponseData *DNSResponseData `protobuf:"bytes,2,opt,name=dns_response_data,json=dnsResponseData,proto3" json:"dns_response_data,omitempty"` // DNS response metadata extracted from the DNS message
SourcePort uint32 `protobuf:"varint,3,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` // Source port of the endpoint making the DNS request
ServerAddr string `protobuf:"bytes,4,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` // IP:port of the destination DNS server as "ip:port" string (e.g., "8.8.8.8:53")
ServerIdentity uint32 `protobuf:"varint,5,opt,name=server_identity,json=serverIdentity,proto3" json:"server_identity,omitempty"` // Security identity of the destination DNS server
Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` // L4 protocol used for the DNS request (e.g., "udp", "tcp")
Allowed bool `protobuf:"varint,7,opt,name=allowed,proto3" json:"allowed,omitempty"` // Whether the DNS request was allowed by policy
ErrorMessage string `protobuf:"bytes,8,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // Error message if the DNS request encountered an error (empty if no error)
ErrorType ProxyErrorType `` // Structured error classification for metrics without relying on string matching.
/* 128-byte string literal not displayed */
// contains filtered or unexported fields
}
MetricsData carries the flow context and timing statistics that the agent needs to emit proxy metrics and access log records for DNS events originating from the standalone DNS proxy.
func (*MetricsData) Descriptor
deprecated
added in
v1.20.0
func (*MetricsData) Descriptor() ([]byte, []int)
Deprecated: Use MetricsData.ProtoReflect.Descriptor instead.
func (*MetricsData) GetAllowed ¶ added in v1.20.0
func (x *MetricsData) GetAllowed() bool
func (*MetricsData) GetDnsResponseData ¶ added in v1.20.0
func (x *MetricsData) GetDnsResponseData() *DNSResponseData
func (*MetricsData) GetErrorMessage ¶ added in v1.20.0
func (x *MetricsData) GetErrorMessage() string
func (*MetricsData) GetErrorType ¶ added in v1.20.0
func (x *MetricsData) GetErrorType() ProxyErrorType
func (*MetricsData) GetProcessingStats ¶ added in v1.20.0
func (x *MetricsData) GetProcessingStats() *ProcessingStats
func (*MetricsData) GetProtocol ¶ added in v1.20.0
func (x *MetricsData) GetProtocol() string
func (*MetricsData) GetServerAddr ¶ added in v1.20.0
func (x *MetricsData) GetServerAddr() string
func (*MetricsData) GetServerIdentity ¶ added in v1.20.0
func (x *MetricsData) GetServerIdentity() uint32
func (*MetricsData) GetSourcePort ¶ added in v1.20.0
func (x *MetricsData) GetSourcePort() uint32
func (*MetricsData) MarshalJSON ¶ added in v1.20.0
func (msg *MetricsData) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*MetricsData) ProtoMessage ¶ added in v1.20.0
func (*MetricsData) ProtoMessage()
func (*MetricsData) ProtoReflect ¶ added in v1.20.0
func (x *MetricsData) ProtoReflect() protoreflect.Message
func (*MetricsData) Reset ¶ added in v1.20.0
func (x *MetricsData) Reset()
func (*MetricsData) String ¶ added in v1.20.0
func (x *MetricsData) String() string
func (*MetricsData) UnmarshalJSON ¶ added in v1.20.0
func (msg *MetricsData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type PolicyState ¶
type PolicyState struct {
EgressL7DnsPolicy []*DNSPolicy `protobuf:"bytes,1,rep,name=egress_l7_dns_policy,json=egressL7DnsPolicy,proto3" json:"egress_l7_dns_policy,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Random UUID based identifier which will be referenced in ACKs
IdentityToEndpointMapping []*IdentityToEndpointMapping `` // Identity to Endpoint mapping for the DNS server and the source identity
/* 140-byte string literal not displayed */
IdentityToPrefixMapping []*IdentityToPrefixMapping `` // Identity to Prefix mapping for the identity
/* 134-byte string literal not displayed */
// contains filtered or unexported fields
}
L7 DNS policy snapshot of all local endpoints and identity to ip mapping of source and destinatione egress endpoints enforcing fqdn rules.
func (*PolicyState) Descriptor
deprecated
func (*PolicyState) Descriptor() ([]byte, []int)
Deprecated: Use PolicyState.ProtoReflect.Descriptor instead.
func (*PolicyState) GetEgressL7DnsPolicy ¶
func (x *PolicyState) GetEgressL7DnsPolicy() []*DNSPolicy
func (*PolicyState) GetIdentityToEndpointMapping ¶
func (x *PolicyState) GetIdentityToEndpointMapping() []*IdentityToEndpointMapping
func (*PolicyState) GetIdentityToPrefixMapping ¶ added in v1.19.0
func (x *PolicyState) GetIdentityToPrefixMapping() []*IdentityToPrefixMapping
func (*PolicyState) GetRequestId ¶
func (x *PolicyState) GetRequestId() string
func (*PolicyState) MarshalJSON ¶
func (msg *PolicyState) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*PolicyState) ProtoMessage ¶
func (*PolicyState) ProtoMessage()
func (*PolicyState) ProtoReflect ¶
func (x *PolicyState) ProtoReflect() protoreflect.Message
func (*PolicyState) Reset ¶
func (x *PolicyState) Reset()
func (*PolicyState) String ¶
func (x *PolicyState) String() string
func (*PolicyState) UnmarshalJSON ¶
func (msg *PolicyState) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type PolicyStateResponse ¶
type PolicyStateResponse struct {
Response ResponseCode `protobuf:"varint,1,opt,name=response,proto3,enum=standalonednsproxy.ResponseCode" json:"response,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Request ID for which response is sent to
// contains filtered or unexported fields
}
Ack sent from SDP to Agent on processing DNS policy rules
func (*PolicyStateResponse) Descriptor
deprecated
func (*PolicyStateResponse) Descriptor() ([]byte, []int)
Deprecated: Use PolicyStateResponse.ProtoReflect.Descriptor instead.
func (*PolicyStateResponse) GetRequestId ¶
func (x *PolicyStateResponse) GetRequestId() string
func (*PolicyStateResponse) GetResponse ¶
func (x *PolicyStateResponse) GetResponse() ResponseCode
func (*PolicyStateResponse) MarshalJSON ¶
func (msg *PolicyStateResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*PolicyStateResponse) ProtoMessage ¶
func (*PolicyStateResponse) ProtoMessage()
func (*PolicyStateResponse) ProtoReflect ¶
func (x *PolicyStateResponse) ProtoReflect() protoreflect.Message
func (*PolicyStateResponse) Reset ¶
func (x *PolicyStateResponse) Reset()
func (*PolicyStateResponse) String ¶
func (x *PolicyStateResponse) String() string
func (*PolicyStateResponse) UnmarshalJSON ¶
func (msg *PolicyStateResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type ProcessingStats ¶ added in v1.20.0
type ProcessingStats struct {
TotalTimeNs int64 `protobuf:"varint,1,opt,name=total_time_ns,json=totalTimeNs,proto3" json:"total_time_ns,omitempty"`
ProcessingTimeNs int64 `protobuf:"varint,2,opt,name=processing_time_ns,json=processingTimeNs,proto3" json:"processing_time_ns,omitempty"`
UpstreamTimeNs int64 `protobuf:"varint,3,opt,name=upstream_time_ns,json=upstreamTimeNs,proto3" json:"upstream_time_ns,omitempty"`
SemaphoreAcquireTimeNs int64 `` /* 132-byte string literal not displayed */
PolicyCheckTimeNs int64 `protobuf:"varint,5,opt,name=policy_check_time_ns,json=policyCheckTimeNs,proto3" json:"policy_check_time_ns,omitempty"`
// contains filtered or unexported fields
}
ProcessingStats carries proxy request timing statistics collected by the standalone DNS proxy. All durations are in nanoseconds. Only fields actually measured by the standalone proxy are included here; agent-side timings (policy generation, dataplane, cache updates, etc.) are measured directly by the agent after receiving the gRPC message.
func (*ProcessingStats) Descriptor
deprecated
added in
v1.20.0
func (*ProcessingStats) Descriptor() ([]byte, []int)
Deprecated: Use ProcessingStats.ProtoReflect.Descriptor instead.
func (*ProcessingStats) GetPolicyCheckTimeNs ¶ added in v1.20.0
func (x *ProcessingStats) GetPolicyCheckTimeNs() int64
func (*ProcessingStats) GetProcessingTimeNs ¶ added in v1.20.0
func (x *ProcessingStats) GetProcessingTimeNs() int64
func (*ProcessingStats) GetSemaphoreAcquireTimeNs ¶ added in v1.20.0
func (x *ProcessingStats) GetSemaphoreAcquireTimeNs() int64
func (*ProcessingStats) GetTotalTimeNs ¶ added in v1.20.0
func (x *ProcessingStats) GetTotalTimeNs() int64
func (*ProcessingStats) GetUpstreamTimeNs ¶ added in v1.20.0
func (x *ProcessingStats) GetUpstreamTimeNs() int64
func (*ProcessingStats) MarshalJSON ¶ added in v1.20.0
func (msg *ProcessingStats) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ProcessingStats) ProtoMessage ¶ added in v1.20.0
func (*ProcessingStats) ProtoMessage()
func (*ProcessingStats) ProtoReflect ¶ added in v1.20.0
func (x *ProcessingStats) ProtoReflect() protoreflect.Message
func (*ProcessingStats) Reset ¶ added in v1.20.0
func (x *ProcessingStats) Reset()
func (*ProcessingStats) String ¶ added in v1.20.0
func (x *ProcessingStats) String() string
func (*ProcessingStats) UnmarshalJSON ¶ added in v1.20.0
func (msg *ProcessingStats) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type ProxyErrorType ¶ added in v1.20.0
type ProxyErrorType int32
ProxyErrorType classifies the error that occurred during DNS proxy processing. The agent uses this to reconstruct the correct error type for metrics reporting (metric label, semaphore-rejected counter, etc.) without relying on Go error-type information that is lost during gRPC serialization.
const ( // No error occurred. ProxyErrorType_PROXY_ERROR_TYPE_NONE ProxyErrorType = 0 // A generic proxy-side error (e.g. failed to parse, forward, etc.). ProxyErrorType_PROXY_ERROR_TYPE_PROXY ProxyErrorType = 1 // An upstream network timeout (e.g. DNS server did not respond). ProxyErrorType_PROXY_ERROR_TYPE_TIMEOUT ProxyErrorType = 2 // The DNS proxy concurrency semaphore could not be acquired immediately. ProxyErrorType_PROXY_ERROR_TYPE_SEMAPHORE_FAILED ProxyErrorType = 3 // The DNS proxy concurrency semaphore timed out during the grace period. ProxyErrorType_PROXY_ERROR_TYPE_SEMAPHORE_TIMED_OUT ProxyErrorType = 4 )
func (ProxyErrorType) Descriptor ¶ added in v1.20.0
func (ProxyErrorType) Descriptor() protoreflect.EnumDescriptor
func (ProxyErrorType) Enum ¶ added in v1.20.0
func (x ProxyErrorType) Enum() *ProxyErrorType
func (ProxyErrorType) EnumDescriptor
deprecated
added in
v1.20.0
func (ProxyErrorType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProxyErrorType.Descriptor instead.
func (ProxyErrorType) Number ¶ added in v1.20.0
func (x ProxyErrorType) Number() protoreflect.EnumNumber
func (ProxyErrorType) String ¶ added in v1.20.0
func (x ProxyErrorType) String() string
func (ProxyErrorType) Type ¶ added in v1.20.0
func (ProxyErrorType) Type() protoreflect.EnumType
type ResponseCode ¶
type ResponseCode int32
Response code returned by RPC methods.
const ( ResponseCode_RESPONSE_CODE_UNSPECIFIED ResponseCode = 0 ResponseCode_RESPONSE_CODE_NO_ERROR ResponseCode = 1 ResponseCode_RESPONSE_CODE_FORMAT_ERROR ResponseCode = 2 ResponseCode_RESPONSE_CODE_SERVER_FAILURE ResponseCode = 3 ResponseCode_RESPONSE_CODE_NOT_IMPLEMENTED ResponseCode = 4 ResponseCode_RESPONSE_CODE_ERROR_INVALID_ARGUMENT ResponseCode = 6 // Invalid argument passed to the RPC method ResponseCode_RESPONSE_CODE_ERROR_ENDPOINT_NOT_FOUND ResponseCode = 5 // Endpoint not found for the given IP ResponseCode_RESPONSE_CODE_REFUSED ResponseCode = 7 )
func (ResponseCode) Descriptor ¶
func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
func (ResponseCode) Enum ¶
func (x ResponseCode) Enum() *ResponseCode
func (ResponseCode) EnumDescriptor
deprecated
func (ResponseCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResponseCode.Descriptor instead.
func (ResponseCode) Number ¶
func (x ResponseCode) Number() protoreflect.EnumNumber
func (ResponseCode) String ¶
func (x ResponseCode) String() string
func (ResponseCode) Type ¶
func (ResponseCode) Type() protoreflect.EnumType
type UnimplementedFQDNDataServer ¶
type UnimplementedFQDNDataServer struct{}
UnimplementedFQDNDataServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFQDNDataServer) StreamPolicyState ¶
func (UnimplementedFQDNDataServer) StreamPolicyState(grpc.BidiStreamingServer[PolicyStateResponse, PolicyState]) error
func (UnimplementedFQDNDataServer) UpdateMappingRequest ¶
func (UnimplementedFQDNDataServer) UpdateMappingRequest(context.Context, *FQDNMapping) (*UpdateMappingResponse, error)
type UnsafeFQDNDataServer ¶
type UnsafeFQDNDataServer interface {
// contains filtered or unexported methods
}
UnsafeFQDNDataServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FQDNDataServer will result in compilation errors.
type UpdateMappingResponse ¶
type UpdateMappingResponse struct {
Response ResponseCode `protobuf:"varint,1,opt,name=response,proto3,enum=standalonednsproxy.ResponseCode" json:"response,omitempty"`
// contains filtered or unexported fields
}
Ack returned by cilium agent to SDP on receiving FQDN-IP mapping update
func (*UpdateMappingResponse) Descriptor
deprecated
func (*UpdateMappingResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateMappingResponse.ProtoReflect.Descriptor instead.
func (*UpdateMappingResponse) GetResponse ¶
func (x *UpdateMappingResponse) GetResponse() ResponseCode
func (*UpdateMappingResponse) MarshalJSON ¶
func (msg *UpdateMappingResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*UpdateMappingResponse) ProtoMessage ¶
func (*UpdateMappingResponse) ProtoMessage()
func (*UpdateMappingResponse) ProtoReflect ¶
func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message
func (*UpdateMappingResponse) Reset ¶
func (x *UpdateMappingResponse) Reset()
func (*UpdateMappingResponse) String ¶
func (x *UpdateMappingResponse) String() string
func (*UpdateMappingResponse) UnmarshalJSON ¶
func (msg *UpdateMappingResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler