Documentation ¶
Overview ¶
This package is intended to be a centralized module for any shared utilities across activities for the datasync workflow
Index ¶
- Constants
- func BuildBenthosRedisTlsConfig(redisConfig *RedisConfig) *neosync_benthos.RedisTlsConfig
- func GetBenthosConfigExternalId(identifier string) string
- func GetConnectionById(ctx context.Context, connclient mgmtv1alpha1connect.ConnectionServiceClient, ...) (*mgmtv1alpha1.Connection, error)
- func GetJobSourceConnection(ctx context.Context, jobSource *mgmtv1alpha1.JobSource, ...) (*mgmtv1alpha1.Connection, error)
- func GetNeosyncHttpClient() *http.Client
- func GetNeosyncUrl() string
- func GetUniqueSchemasFromJob(job *mgmtv1alpha1.Job) []string
- func GetUniqueSchemasFromMappings(mappings []*mgmtv1alpha1.JobMapping) []string
- func GetUniqueTablesFromMappings(mappings []*mgmtv1alpha1.JobMapping) map[string]struct{}
- func GetUniqueTablesMapFromJob(job *mgmtv1alpha1.Job) map[string]struct{}
- func Ptr[T any](val T) *T
- type BenthosDsn
- type RedisConfig
- type RedisTlsConfig
- type SqlJobDestinationOpts
- type WorkflowMetadata
Constants ¶
const (
// The benthos value for null
NullString = "null"
)
Variables ¶
This section is empty.
Functions ¶
func BuildBenthosRedisTlsConfig ¶
func BuildBenthosRedisTlsConfig(redisConfig *RedisConfig) *neosync_benthos.RedisTlsConfig
func GetBenthosConfigExternalId ¶ added in v0.4.54
func GetConnectionById ¶
func GetConnectionById( ctx context.Context, connclient mgmtv1alpha1connect.ConnectionServiceClient, connectionId string, ) (*mgmtv1alpha1.Connection, error)
func GetJobSourceConnection ¶
func GetJobSourceConnection( ctx context.Context, jobSource *mgmtv1alpha1.JobSource, connclient mgmtv1alpha1connect.ConnectionServiceClient, ) (*mgmtv1alpha1.Connection, error)
func GetNeosyncHttpClient ¶
Returns an instance of *http.Client that includes the Neosync API Token if one was found in the environment
func GetNeosyncUrl ¶
func GetNeosyncUrl() string
Returns the neosync url found in the environment, otherwise defaults to localhost
func GetUniqueSchemasFromJob ¶
func GetUniqueSchemasFromJob(job *mgmtv1alpha1.Job) []string
Parses the job and returns the unique set of schemas.
func GetUniqueSchemasFromMappings ¶
func GetUniqueSchemasFromMappings(mappings []*mgmtv1alpha1.JobMapping) []string
Parses the job mappings and returns the unique set of schemas found
func GetUniqueTablesFromMappings ¶
func GetUniqueTablesFromMappings(mappings []*mgmtv1alpha1.JobMapping) map[string]struct{}
Parses the job mappings and returns the unique set of tables.
func GetUniqueTablesMapFromJob ¶
func GetUniqueTablesMapFromJob(job *mgmtv1alpha1.Job) map[string]struct{}
Parses the job and returns the unique set of tables.
Types ¶
type BenthosDsn ¶
Holds the environment variable name and the connection id that should replace it at runtime when the Sync activity is launched
type RedisConfig ¶
type RedisConfig struct { Url string Kind string Master *string Tls *RedisTlsConfig }
func GetRedisConfig ¶
func GetRedisConfig() *RedisConfig
type RedisTlsConfig ¶
type SqlJobDestinationOpts ¶ added in v0.4.67
type SqlJobDestinationOpts struct { TruncateBeforeInsert bool TruncateCascade bool InitSchema bool }
func GetSqlJobDestinationOpts ¶ added in v0.4.67
func GetSqlJobDestinationOpts( options *mgmtv1alpha1.JobDestinationOptions, ) (*SqlJobDestinationOpts, error)
type WorkflowMetadata ¶
General workflow metadata struct that is intended to be common across activities