Documentation
¶
Index ¶
- Constants
- func ActiveSessions(db *sql.DB) ([]map[string]any, error)
- func CompareLastModified(dfStatMapA map[string]any, dfStatMapB map[string]any) bool
- func DecryptSecretConfig(sourceDatabaseConfigs map[string]any, config map[string]any) (string, error)
- func FindIndexForService(tfmContext flowcore.FlowMachineContext, project string, service string) (string, []string, string, error)
- func GetConfigPaths(pluginName string) []string
- func GetDFSPathName() (string, string)
- func GetDatabaseName(flumeDbType flowcore.FlumeDbType) string
- func GetDefaultDeployments() string
- func GetDefaultRegion() string
- func GetFolderPrefix(custom []string) string
- func GetLocalHost() string
- func GetMachineID() string
- func GetPluginRestrictedMappings() map[string][][]string
- func GetRegionByHost(hostName string) string
- func GetSupportedCertIssuers() []string
- func GetSupportedDomains(prod bool) []string
- func GetSupportedEndpoints(prod bool) [][]string
- func GetSupportedTemplates(custom []string) []string
- func GetSyncedTables() []string
- func GetUserCodeField() string
- func GetUserNameField() string
- func GetVaultHost() string
- func GetVaultHostPort() string
- func GetVaultInstallRoot() string
- func InitPluginConfig(pluginEnvConfig map[string]any) map[string]any
- func IsKubeRunnable() bool
- func IsLocalEndpoint(addr string) bool
- func IsSupportedFlow(flow string) bool
- func IsTestRunner() bool
- func IsValidIP(ipaddr string) (bool, error)
- func NewOptionsBuilder(opts ...Option)
- func PreviousStateCheck(currentState int) int
- type Option
- type OptionsBuilder
Constants ¶
const RFC_ISO_8601 = "2006-01-02 15:04:05 -0700 MST"
Variables ¶
This section is empty.
Functions ¶
func ActiveSessions ¶
Override to provide a map of active sessions by querying the provided database connection. Used to provide active sessions in the web interface -- not maintained..
func CompareLastModified ¶ added in v1.0.1
Compares the lastModified field in the provided data flow statistics maps. It returns true if the lastModified fields are equal. False otherwise. Override to provide alternate fields to match on in your flows for comparing lastModified or even other fields...
func DecryptSecretConfig ¶
func DecryptSecretConfig(sourceDatabaseConfigs map[string]any, config map[string]any) (string, error)
DecryptSecretConfig provides the secret to be used in obtaining a database connection when provided with source database configuration attributes. The config map contains additional global attributes that can be utilized in decrypting an encrypted password found within the source database configuration.
Returns the decrypted password to be used in establishing a database connection.
func FindIndexForService ¶
func FindIndexForService(tfmContext flowcore.FlowMachineContext, project string, service string) (string, []string, string, error)
FindIndexForService - override to provide a custom index for a given service. This should return the name of the column that is to be treated as the index for the table. TODO: This function is miss-named. It should be called FindIndexForFlow where project = databaseName and service = tableName.
func GetConfigPaths ¶ added in v1.30.4
func GetDFSPathName ¶ added in v1.0.1
Utlized to provide Data Flow Statistics components: database name in which the DFS resides and the index of the DataFlowStatistics table (argosId)
func GetDatabaseName ¶ added in v1.0.1
func GetDatabaseName(flumeDbType flowcore.FlumeDbType) string
GetDatabaseName - returns a name to be used by TrcDb.
func GetDefaultDeployments ¶ added in v1.54.8
func GetDefaultDeployments() string
GetDefaultDeployments returns a hardwired deployment shard fallback when DEPLOYMENTS is absent. Empty string means no fallback; DEPLOYMENTS must be provided by config/env.
func GetDefaultRegion ¶ added in v1.53.2
func GetDefaultRegion() string
GetDefaultRegion - return the default region. Override this function to provide a custom default region. Any time this region is specified, it will initiate loading of default configurations
func GetFolderPrefix ¶
Folder prefix for _seed and _templates. This function takes a list of paths and looking at the first entry, retrieve an embedded folder prefix.
func GetLocalHost ¶
func GetLocalHost() string
GetLocalHost - return the local host name. Override this function to provide a custom local host name.
func GetMachineID ¶ added in v1.18.2
func GetMachineID() string
func GetPluginRestrictedMappings ¶ added in v1.28.7
Override this to allow tierceron to use and manage plugin configuraitons. These are generally cross-verified against vault.
func GetRegionByHost ¶ added in v1.53.2
GetRegionByHost - return the region for a given host name. Override this function to provide region mapping by host name.
func GetSupportedCertIssuers ¶ added in v1.31.1
func GetSupportedCertIssuers() []string
func GetSupportedDomains ¶ added in v1.5.3
GetSupportedDomains - return a list of supported domains. Override this function to provide a list of supported domains.
func GetSupportedEndpoints ¶
GetSupportedEndpoints - return a list of supported endpoints. Override this function to provide a list of supported endpoints.
func GetSupportedTemplates ¶
GetSupportedTemplates - override to provide a list of supported certificate templates. This function serves as a gateway so that unintentional certificates or files are not picked up and inadvertently seeded into vault. example return value:
return []string{
folderPrefix + "_templates/Common/my.cer.mf.tmpl",
folderPrefix + "_templates/Common/my.pem.mf.tmpl",
}
func GetSyncedTables ¶
func GetSyncedTables() []string
GetSyncedTables - return a list of synced tables from a remote source in TrcDb. Override this function to provide a list of synced tables.
func GetUserCodeField ¶
func GetUserCodeField() string
GetUserCodeField - return the user code field. Override this function to provide a custom user code field. Used to provide active sessions in the web interface -- not maintained..
func GetUserNameField ¶
func GetUserNameField() string
GetUserNameField - return the user name field. Override this function to provide a custom user name field. Used to provide active sessions in the web interface -- not maintained..
func GetVaultHost ¶
func GetVaultHost() string
GetVaultHost - return the vault host. Override this function to provide a custom vault host.
func GetVaultHostPort ¶
func GetVaultHostPort() string
GetVaultHost - return the vault host and port. Override this function to provide a custom vault host and port.
func GetVaultInstallRoot ¶ added in v1.10.4
func GetVaultInstallRoot() string
func InitPluginConfig ¶ added in v1.20.0
Utilized by trcsh curator to indicate the following map attributes:
exitOnFailure - if true, the plugin will exit on failure
regions - a list of regions to be supported by the carrier
pluginNameList - a list of plugins to be supported by the carrier
the carrier is responsible for keeping the indicated plugins
up to date and deployed with certified code...
example values: trcsh, trc-vault-plugin
templatePath - a list of template paths (presently 1 template) to the certification
template utilized by plugins. This template references the published template
originating from the source:
installation/trcdb/trc_templates/TrcVault/Certify/config.yml.tmpl
logNamespace - a log namespace to be used by the carrier in logging.
func IsKubeRunnable ¶ added in v1.52.2
func IsKubeRunnable() bool
IsKubeRunnable returns true if this build variant is allowed to run in Kubernetes/AKS
func IsLocalEndpoint ¶ added in v1.7.9
Determines if running tierceron in the default local development mode with the default test host.
func IsSupportedFlow ¶ added in v1.39.7
func IsTestRunner ¶
func IsTestRunner() bool
func NewOptionsBuilder ¶ added in v1.0.1
func NewOptionsBuilder(opts ...Option)
func PreviousStateCheck ¶ added in v1.0.1
PreviousStateCheck - provides the previous state of a flow given the provided current state. All states for flows rotate in a 0-3 cycle.
Types ¶
type Option ¶ added in v1.0.1
type Option func(*OptionsBuilder)
func LoadOptions ¶ added in v1.0.1
func LoadOptions() Option
type OptionsBuilder ¶ added in v1.0.1
type OptionsBuilder struct {
*corecoreopts.OptionsBuilder
GetDefaultDeployments func() string
GetConfigPaths func(string) []string
IsKubeRunnable func() bool
}
var BuildOptions *OptionsBuilder