Documentation
¶
Index ¶
- Variables
- func Deliver(ctx context.Context, id string, path string, s Source, d Destination) (string, error)
- func GetDeliveredFilename(ctx context.Context, tuid string, pathTemplate string, ...) (string, error)
- func RegisterSource(name string, s Source)
- type AzureDestination
- type AzureSource
- type Config
- type Destination
- type FileDestination
- type FileSource
- type Group
- type PathInfo
- type S3Destination
- func (sd *S3Destination) Client() *s3.Client
- func (sd *S3Destination) Health(ctx context.Context) (rsp models.ServiceHealthResp)
- func (sd *S3Destination) Retrieve(_ context.Context) (aws.Credentials, error)
- func (sd *S3Destination) Upload(ctx context.Context, path string, r io.Reader, m map[string]string) (string, error)
- type S3Source
- type Source
- type Target
- type TargetDesignation
Constants ¶
This section is empty.
Variables ¶
View Source
var DestinationTypes = map[string]func() Destination{ "s3": func() Destination { return &S3Destination{} }, "file": func() Destination { return &FileDestination{} }, "az-blob": func() Destination { return &AzureDestination{} }, }
View Source
var ErrBadIngestTimestamp = errors.New("bad ingest timestamp")
View Source
var ErrSrcFileNotExist = fmt.Errorf("source file does not exist")
View Source
var ErrUnknownDestinationType = errors.New("Unknown destination type")
View Source
var Groups map[string]Group
View Source
var Targets map[string]Destination
View Source
var UploadSrc = "upload"
Functions ¶
func GetDeliveredFilename ¶
func RegisterSource ¶
Types ¶
type AzureDestination ¶
type AzureDestination struct { Name string `yaml:"name"` StorageAccount string `yaml:"storage_account"` StorageKey string `yaml:"storage_key"` PathTemplate string `yaml:"path_template"` ContainerEndpoint string `yaml:"endpoint"` TenantId string `yaml:"tenant_id"` ClientId string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` ContainerName string `yaml:"container_name"` // contains filtered or unexported fields }
func (*AzureDestination) Health ¶
func (ad *AzureDestination) Health(ctx context.Context) (rsp models.ServiceHealthResp)
type AzureSource ¶
func (*AzureSource) GetMetadata ¶
func (*AzureSource) Health ¶
func (ad *AzureSource) Health(ctx context.Context) (rsp models.ServiceHealthResp)
type Config ¶
type Config struct { Targets map[string]Target `yaml:"targets"` Groups []Group `yaml:"routing_groups"` }
func UnmarshalDeliveryConfig ¶
type Destination ¶
type Destination interface {
Upload(context.Context, string, io.Reader, map[string]string) (string, error)
}
func GetTarget ¶
func GetTarget(target string) (Destination, bool)
type FileDestination ¶
type FileDestination struct { ToPath string `yaml:"path"` Name string `yaml:"name"` PathTemplate string `yaml:"path_template"` }
func (*FileDestination) Health ¶
func (fd *FileDestination) Health(_ context.Context) (rsp models.ServiceHealthResp)
type FileSource ¶
func (*FileSource) GetMetadata ¶
func (*FileSource) Health ¶
func (fd *FileSource) Health(_ context.Context) (rsp models.ServiceHealthResp)
type Group ¶
type Group struct { DataStreamId string `yaml:"data_stream_id"` DataStreamRoute string `yaml:"data_stream_route"` DeliveryTargets []TargetDesignation `yaml:"delivery_targets"` }
func (*Group) TargetNames ¶
type S3Destination ¶
type S3Destination struct { BucketName string `yaml:"bucket_name"` Name string `yaml:"name"` PathTemplate string `yaml:"path_template"` AccessKeyID string `yaml:"access_key_id"` SecretAccessKey string `yaml:"secret_access_key"` Endpoint string `yaml:"endpoint"` Region string `yaml:"region"` // contains filtered or unexported fields }
func (*S3Destination) Client ¶
func (sd *S3Destination) Client() *s3.Client
func (*S3Destination) Health ¶
func (sd *S3Destination) Health(ctx context.Context) (rsp models.ServiceHealthResp)
func (*S3Destination) Retrieve ¶
func (sd *S3Destination) Retrieve(_ context.Context) (aws.Credentials, error)
type S3Source ¶
func (*S3Source) GetMetadata ¶
type Source ¶
type Target ¶
type Target struct { Name string `yaml:"name"` Type string `yaml:"type"` Destination Destination `yaml:"-"` }
func (*Target) UnmarshalYAML ¶
type TargetDesignation ¶
Click to show internal directories.
Click to hide internal directories.