Documentation
¶
Index ¶
- Variables
- type AgentSource
- func (s *AgentSource) ID() string
- func (s *AgentSource) ListTargets(ctx context.Context) ([]TargetRef, error)
- func (s *AgentSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
- func (s *AgentSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
- func (s *AgentSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
- func (s *AgentSource) Type() SourceType
- type HTTPIndex
- type HTTPSource
- func (s *HTTPSource) ID() string
- func (s *HTTPSource) ListTargets(ctx context.Context) ([]TargetRef, error)
- func (s *HTTPSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
- func (s *HTTPSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
- func (s *HTTPSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
- func (s *HTTPSource) Type() SourceType
- type LocalSource
- func (s *LocalSource) ID() string
- func (s *LocalSource) ListTargets(ctx context.Context) ([]TargetRef, error)
- func (s *LocalSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
- func (s *LocalSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
- func (s *LocalSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
- func (s *LocalSource) Type() SourceType
- type LogSource
- type RangePolicy
- type S3Source
- func (s *S3Source) ID() string
- func (s *S3Source) ListTargets(ctx context.Context) ([]TargetRef, error)
- func (s *S3Source) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
- func (s *S3Source) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
- func (s *S3Source) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
- func (s *S3Source) Type() SourceType
- type SFTPSource
- func (s *SFTPSource) ID() string
- func (s *SFTPSource) ListTargets(ctx context.Context) ([]TargetRef, error)
- func (s *SFTPSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
- func (s *SFTPSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
- func (s *SFTPSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
- func (s *SFTPSource) Type() SourceType
- type SourceType
- type TargetMeta
- type TargetRef
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRangeNotSupported = errors.New("range not supported") ErrStreamNotSupported = errors.New("stream not supported") )
Functions ¶
This section is empty.
Types ¶
type AgentSource ¶
type AgentSource struct {
// contains filtered or unexported fields
}
func NewAgentSource ¶
func NewAgentSource(websiteID, id string) *AgentSource
func (*AgentSource) ID ¶
func (s *AgentSource) ID() string
func (*AgentSource) ListTargets ¶
func (s *AgentSource) ListTargets(ctx context.Context) ([]TargetRef, error)
func (*AgentSource) OpenRange ¶
func (s *AgentSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
func (*AgentSource) OpenStream ¶
func (s *AgentSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
func (*AgentSource) Stat ¶
func (s *AgentSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
func (*AgentSource) Type ¶
func (s *AgentSource) Type() SourceType
type HTTPSource ¶
type HTTPSource struct {
// contains filtered or unexported fields
}
func NewHTTPSource ¶
func NewHTTPSource(websiteID, id, url string, headers map[string]string, rangePolicy RangePolicy, index *HTTPIndex, compression string) *HTTPSource
func NewHTTPSourceWithTimeout ¶ added in v1.6.13
func NewHTTPSourceWithTimeout( websiteID, id, url string, headers map[string]string, rangePolicy RangePolicy, index *HTTPIndex, compression string, timeout time.Duration, ) *HTTPSource
func (*HTTPSource) ID ¶
func (s *HTTPSource) ID() string
func (*HTTPSource) ListTargets ¶
func (s *HTTPSource) ListTargets(ctx context.Context) ([]TargetRef, error)
func (*HTTPSource) OpenRange ¶
func (s *HTTPSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
func (*HTTPSource) OpenStream ¶
func (s *HTTPSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
func (*HTTPSource) Stat ¶
func (s *HTTPSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
func (*HTTPSource) Type ¶
func (s *HTTPSource) Type() SourceType
type LocalSource ¶
type LocalSource struct {
// contains filtered or unexported fields
}
func NewLocalSource ¶
func NewLocalSource(websiteID, id, path, pattern, compression string) *LocalSource
func (*LocalSource) ID ¶
func (s *LocalSource) ID() string
func (*LocalSource) ListTargets ¶
func (s *LocalSource) ListTargets(ctx context.Context) ([]TargetRef, error)
func (*LocalSource) OpenRange ¶
func (s *LocalSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
func (*LocalSource) OpenStream ¶
func (s *LocalSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
func (*LocalSource) Stat ¶
func (s *LocalSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
func (*LocalSource) Type ¶
func (s *LocalSource) Type() SourceType
type LogSource ¶
type LogSource interface {
ID() string
Type() SourceType
ListTargets(ctx context.Context) ([]TargetRef, error)
OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
}
func NewFromConfig ¶
func NewFromConfig(websiteID string, cfg config.SourceConfig) (LogSource, error)
type RangePolicy ¶
type RangePolicy string
const ( RangeAuto RangePolicy = "auto" RangeForce RangePolicy = "range" RangeFull RangePolicy = "full" )
type S3Source ¶
type S3Source struct {
// contains filtered or unexported fields
}
func NewS3Source ¶
func (*S3Source) ListTargets ¶
func (*S3Source) OpenStream ¶
func (*S3Source) Type ¶
func (s *S3Source) Type() SourceType
type SFTPSource ¶
type SFTPSource struct {
// contains filtered or unexported fields
}
func NewSFTPSource ¶
func NewSFTPSource(websiteID, id, host string, port int, user, keyFile, password, passphrase, pathValue, pattern, compression string) *SFTPSource
func (*SFTPSource) ID ¶
func (s *SFTPSource) ID() string
func (*SFTPSource) ListTargets ¶
func (s *SFTPSource) ListTargets(ctx context.Context) ([]TargetRef, error)
func (*SFTPSource) OpenRange ¶
func (s *SFTPSource) OpenRange(ctx context.Context, target TargetRef, start, end int64) (io.ReadCloser, error)
func (*SFTPSource) OpenStream ¶
func (s *SFTPSource) OpenStream(ctx context.Context, target TargetRef) (io.ReadCloser, error)
func (*SFTPSource) Stat ¶
func (s *SFTPSource) Stat(ctx context.Context, target TargetRef) (TargetMeta, error)
func (*SFTPSource) Type ¶
func (s *SFTPSource) Type() SourceType
type SourceType ¶
type SourceType string
const ( SourceLocal SourceType = "local" SourceSFTP SourceType = "sftp" SourceHTTP SourceType = "http" SourceS3 SourceType = "s3" SourceAgent SourceType = "agent" )
type TargetMeta ¶
Click to show internal directories.
Click to hide internal directories.