Documentation ¶
Index ¶
Constants ¶
View Source
const MetadataHostName = "Host"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthData ¶
type AuthData interface { // GetAttribute returns the value for the given attribute. Authenticator // implementations might define different data types for different // attributes. While "string" is used most of the time, a key named // "membership" might return a list of strings. GetAttribute(string) interface{} // GetAttributes returns the names of all attributes in this authentication // data. GetAttributeNames() []string }
AuthData represents the authentication data as seen by authenticators tied to the receivers.
type Info ¶
type Info struct { // Addr for the client connecting to this collector. Available in a // best-effort basis, and generally reliable for receivers making use of // confighttp.ToServer and configgrpc.ToServerOption. Addr net.Addr // Auth information from the incoming request as provided by // configauth.ServerAuthenticator implementations tied to the receiver for // this connection. Auth AuthData // Metadata is the request metadata from the client connecting to this connector. // Experimental: *NOTE* this structure is subject to change or removal in the future. Metadata Metadata }
Info contains data related to the clients connecting to receivers.
func FromContext ¶
FromContext takes a context and returns a ClientInfo from it. When a ClientInfo isn't present, a new empty one is returned.
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata is an immutable map, meant to contain request metadata.
func NewMetadata ¶
NewMetadata creates a new Metadata object to use in Info. md is used as-is.
Click to show internal directories.
Click to hide internal directories.