Documentation ¶
Index ¶
- Constants
- Variables
- func DisableReconnect()
- func EnableReconnect()
- func GetPodLabels() map[string]string
- func RegisterParseAdsConfig(f func(dynamic, static json.RawMessage) (XdsStreamConfig, error))
- func SetMetadata(meta *_struct.Struct)
- func SetServiceCluster(sc string)
- func SetServiceNode(sn string)
- type ADSClient
- type Meta
- type TrafficInterceptionMode
- type XdsInfo
- type XdsStreamClient
- type XdsStreamConfig
Constants ¶
View Source
const ( // KContextProtocol const string KContextProtocol = "context.protocol" // KDestinationIP const string KDestinationIP = "destination.ip" // KDestinationPort const string KDestinationPort = "destination.port" // KOriginIP const string KOriginIP = "origin.ip" // KRequestTime const string KRequestTime = "request.time" // KRequestBodySize const string KRequestBodySize = "request.size" // const string KRequestTotalSize = "request.total_size" // KResponseCode const string KResponseCode = "response.code" // KResponseDuration const string KResponseDuration = "response.duration" // KResponseHeaders const string KResponseHeaders = "response.headers" // KResponseBodySize const string KResponseBodySize = "response.size" // KResponseTotalSize const string KResponseTotalSize = "response.total_size" // KResponseTime const string KResponseTime = "response.time" // KRequestHeaders const string KRequestHeaders = "request.headers" // KRequestPath const string KRequestPath = "request.path" // KRequestUrlPath const string KRequestUrlPath = "request.url_path" // KRequestQueryParams const string KRequestQueryParams = "request.query_params" // KRequestMethod const string KRequestMethod = "request.method" // KRequestHost const string KRequestHost = "request.host" // KDestinationServiceHost const string KDestinationServiceHost = "destination.service.host" // KDestinationServiceName const string KDestinationServiceName = "destination.service.name" // KDestinationServiceNamespace const string KDestinationServiceNamespace = "destination.service.namespace" // KContextReporterKind const string KContextReporterKind = "context.reporter.kind" // KIstioAttributeHeader is the istio attribute name KIstioAttributeHeader = "x-istio-attributes" )
Define attribute names
Variables ¶
View Source
var (
// IstioPodInfoPath Sidecar mountPath
IstioPodInfoPath = "/etc/istio/pod"
)
View Source
var IstioVersion = "unknow"
IstioVersion adapt istio version
Functions ¶
func DisableReconnect ¶
func DisableReconnect()
func EnableReconnect ¶
func EnableReconnect()
func RegisterParseAdsConfig ¶ added in v0.27.0
func RegisterParseAdsConfig(f func(dynamic, static json.RawMessage) (XdsStreamConfig, error))
func SetMetadata ¶
func SetServiceCluster ¶
func SetServiceCluster(sc string)
func SetServiceNode ¶
func SetServiceNode(sn string)
Types ¶
type ADSClient ¶
type ADSClient struct {
// contains filtered or unexported fields
}
func NewAdsClient ¶
func NewAdsClient(config *v2.MOSNConfig) (*ADSClient, error)
func (*ADSClient) GetStreamClient ¶
func (adsClient *ADSClient) GetStreamClient() (c XdsStreamClient)
type Meta ¶
type Meta struct { // IstioVersion specifies the Istio version associated with the proxy IstioVersion string `json:"ISTIO_VERSION,omitempty"` // Labels specifies the set of workload instance (ex: k8s pod) labels associated with this node. Labels map[string]string `json:"LABELS,omitempty"` // InterceptionMode is the name of the metadata variable that carries info about // traffic interception mode at the proxy InterceptionMode TrafficInterceptionMode `json:"INTERCEPTION_MODE,omitempty"` // ClusterID defines the cluster the node belongs to. ClusterID string `json:"CLUSTER_ID,omitempty"` }
type TrafficInterceptionMode ¶
type TrafficInterceptionMode string
const ( // InterceptionNone indicates that the workload is not using IPtables for traffic interception InterceptionNone TrafficInterceptionMode = "NONE" // InterceptionTproxy implies traffic intercepted by IPtables with TPROXY mode InterceptionTproxy TrafficInterceptionMode = "TPROXY" // InterceptionRedirect implies traffic intercepted by IPtables with REDIRECT mode // This is our default mode InterceptionRedirect TrafficInterceptionMode = "REDIRECT" )
type XdsInfo ¶
func GetGlobalXdsInfo ¶
func GetGlobalXdsInfo() XdsInfo
GetGlobalXdsInfo returns a struct, cannot be modified. Update XdsInfo by APIs.
type XdsStreamClient ¶
type XdsStreamConfig ¶
type XdsStreamConfig interface { CreateXdsStreamClient() (XdsStreamClient, error) RefreshDelay() time.Duration // InitAdsRequest returns the first request for the ads InitAdsRequest() interface{} }
func ParseAdsConfig ¶
func ParseAdsConfig(dynamic, static json.RawMessage) (XdsStreamConfig, error)
Click to show internal directories.
Click to hide internal directories.