Documentation ¶
Index ¶
- func CertTemplate() (*x509.Certificate, error)
- func CreateOrFetchToken() (string, error)
- func CreateOrGetClusterAgentAuthToken() (string, error)
- func DeleteAuthToken() error
- func FetchAuthToken() (string, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, error)
- func GenerateRootCert(hosts []string, bits int) (cert *x509.Certificate, certPEM []byte, rootKey *rsa.PrivateKey, err error)
- func GetAuthTokenFilepath() string
- func GetClusterAgentAuthToken() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertTemplate ¶
func CertTemplate() (*x509.Certificate, error)
CertTemplate create x509 certificate template
func CreateOrFetchToken ¶
CreateOrFetchToken gets the authentication token from the auth token file & creates one if it doesn't exist Requires that the config has been set up before calling
func CreateOrGetClusterAgentAuthToken ¶
CreateOrGetClusterAgentAuthToken load the authentication token from: 1st. the configuration value of "cluster_agent.auth_token" in datadog.yaml 2nd. from the filesystem If using the token from the filesystem, the token file must be next to the datadog.yaml with the filename: cluster_agent.auth_token, if such file does not exist it will be created and populated with a newly generated token.
func DeleteAuthToken ¶
func DeleteAuthToken() error
DeleteAuthToken removes auth_token file (test clean up)
func FetchAuthToken ¶
FetchAuthToken gets the authentication token from the auth token file & creates one if it doesn't exist Requires that the config has been set up before calling
func GenerateKeyPair ¶
func GenerateKeyPair(bits int) (*rsa.PrivateKey, error)
GenerateKeyPair create a public/private keypair
func GenerateRootCert ¶
func GenerateRootCert(hosts []string, bits int) ( cert *x509.Certificate, certPEM []byte, rootKey *rsa.PrivateKey, err error)
GenerateRootCert generates a root certificate
func GetAuthTokenFilepath ¶
func GetAuthTokenFilepath() string
GetAuthTokenFilepath returns the path to the auth_token file.
func GetClusterAgentAuthToken ¶
GetClusterAgentAuthToken load the authentication token from: 1st. the configuration value of "cluster_agent.auth_token" in datadog.yaml 2nd. from the filesystem If using the token from the filesystem, the token file must be next to the datadog.yaml with the filename: cluster_agent.auth_token, it will fail if the file does not exist
Types ¶
This section is empty.