Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config contains the global config for xene Config = &XeneConfig{} // ConfigFile is the path of the config file to use for Xene // it will override the default config file. ConfigFile string )
Functions ¶
This section is empty.
Types ¶
type APIServerOpts ¶
type APIServerOpts struct {
// Standalone is the boolean value which represents if xene apiserver is running
// in a standalone mode and thus the agent is running locally.
Standalone bool `yaml:"standalone"`
// Host is the host to bind the apiserver on.
Host string `yaml:"host"`
// Port is the port to run the apiserver on.
Port uint32 `yaml:"port"`
// Scheme to user for APIServer, it can be one of http, https or unix
Scheme string `yaml:"scheme"`
// DisableAuth disables authentication for apiserver api routes.
DisableAuth bool `yaml:"disableAuth"`
// VerboseLogs enables verbose logging for the apiserver.
VerboseLogs bool `yaml:"verboseLogs"`
// KeyFile is the key file to use for apiserver HTTPS scheme.
KeyFile string `yaml:"keyFile"`
// CertFile contains the certificate for apiserver HTTPS scheme.
CertFile string `yaml:"certFile"`
// UnixSocketPath is the unix socket for apiserver unix socket scheme.
UnixSocketPath string `yaml:"unixSocketPath"`
// JWTSecret is the secret to use for issuing JWT tokens by the API server.
JWTSecret string `yaml:"jwtSecret"`
// AllowedDomains contains a list of domain which are allowed to be logged in using the
// OAUTH provider
AllowedDomains []string `yaml:"allowedDomains"`
// Oauth contains oauth providers configuration for the API server, multiple
// oauth providers can be configured at the same time.
Oauth map[string]OauthProvider `yaml:"oauth"`
}
APIServerOpts is the type used for configuration option of xene apiserver.
type AgentOpts ¶
type AgentOpts struct {
// Name is the name of the agent.
Name string `yaml:"name"`
// Host is the host to bind the agent on.
Host string `yaml:"host"`
// Port is the port to run the agent on.
Port uint32 `yaml:"port"`
// ServerName is the host to be used by clients when configuring
// GRPC secure connection.
ServerName string `yaml:"serverName"`
// APIServer is the address of the api server to join.
APIServer string `yaml:"apiServer"`
// APIAuthToken is the authentication token to use when joining the API server.
APIAuthToken string `yaml:"apiAuthToken"`
// Address is the network address of the agent itself, this is used for communication between
// APIserver and agent.
Address string `yaml:"address"`
// Insecure denotes if the Agent should run in insecure mode.
Insecure bool `yaml:"insecure"`
// KeyFile is the key file to use for agent's secure GRPC scheme.
KeyFile string `yaml:"keyFile"`
// CertFile contains the certificate for agent's secure GRPC scheme.
CertFile string `yaml:"certFile"`
// RootCACert contains the root CA certificate for gRPC server.
RootCACert string `yaml:"rootCACert"`
// ClientKeyFile is the key file to use for client connecting to the GRPC server.
ClientKeyFile string `yaml:"clientKeyFile"`
// ClientCertFile contains the certificate for client(apiserver) to connect to GRPC server.
ClientCertFile string `yaml:"clientCertFile"`
// JWTSecret contains the jwt secret for authorizing clients for GRPC
// server
JWTSecret string `yaml:"jwtSecret"`
// StorageDir contains the storage directory of badger database.
StorageDir string `yaml:"storageDir"`
// LocalLogServer runs a log server for local files
LocalLogServer bool `yaml:"localLogServer"`
// LogServerPort is the port to run the log server
LogServerPort uint32 `yaml:"logServerPort"`
}
AgentOpts contains the desired configuration to run.
type OauthProvider ¶
type OauthProvider struct {
// Name is the name of the oauth provider
Name string `yaml:"name"`
// ClientID of the oauth provider
ClientID string `yaml:"clientID"`
// ClientSecret is the secret for the oauth provider
ClientSecret string `yaml:"clientSecret"`
// RedirectURL is the redirect URL of the oauth provider.
RedirectURL string `yaml:"redirectURL"`
// Scopes are the scopes associated with the oauth provider to access.
Scopes []string `yaml:"scopes"`
}
OauthProvider is the authentication provider configuration for Oauth2 based authentication for xene.
type Store ¶
type Store struct {
// Engine is the storage engine to use for xene, it can be any of the previously configured store.
Engine string `yaml:"engine"`
// StorageDirectory is the directory to use for the storage engine configured
// for xene.
StorageDirectory string `yaml:"storageDirectory"`
}
Store is the type which store configuration data related to the storage data to be configured for xene.
type XeneConfig ¶
type XeneConfig struct {
// APIServer contains the options for api server
APIServer APIServerOpts `yaml:"apiserver"`
// Agent contains configuration for xene agent.
Agent AgentOpts `yaml:"agent"`
// Store is the store configuration that xene is configured with.
Store Store `yaml:"store"`
}
XeneConfig is the global config structure for xene.
Click to show internal directories.
Click to hide internal directories.