Documentation ¶
Index ¶
- func SessionLogWriteCloser(rootCtx context.Context, session Session, logWriteTimeout time.Duration) io.WriteCloser
- type CreateParsedTableOpts
- type CreateSessionOpts
- type Provider
- type QueryService
- type Session
- type SessionRepository
- type SqliteProvider
- func (p *SqliteProvider) CreateParsedTable(ctx context.Context, opts *CreateParsedTableOpts) error
- func (p *SqliteProvider) CreateSession(ctx context.Context, opts *CreateSessionOpts) (string, Session, error)
- func (p *SqliteProvider) GetQueryService() (QueryService, error)
- func (p *SqliteProvider) GetSessionRepository() (SessionRepository, error)
- type SqliteQueryService
- type SqliteSession
- type WriteLogLinesBatchPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SessionLogWriteCloser ¶
func SessionLogWriteCloser( rootCtx context.Context, session Session, logWriteTimeout time.Duration, ) io.WriteCloser
SessionLogWriteCloser wraps the session as a io.WriteCloser instance. It's not allowed to call Write() concurrently.
Types ¶
type CreateParsedTableOpts ¶
type CreateSessionOpts ¶
type CreateSessionOpts struct { // Prefix specifies the session name prefix. Prefix string // Name - optional name for the session. Fallback to session id if empty. Name string // ReuseExisting - if true, will try to reuse existing session with the same prefix. // If there are multiple existing sessions with the same prefix, the first one // in ascending alphabetical order will be used. ReuseExisting bool }
type Provider ¶
type Provider interface { CreateSession(ctx context.Context, opts *CreateSessionOpts) (string, Session, error) CreateParsedTable(ctx context.Context, opts *CreateParsedTableOpts) error GetQueryService() (QueryService, error) GetSessionRepository() (SessionRepository, error) }
type QueryService ¶
type QueryService interface { QueryTable( ctx context.Context, payload *v1.QueryTableRequest, ) (*v1.QueryTableResponse, error) }
type Session ¶
type Session interface {
WriteLogLinesBatch(ctx context.Context, payload WriteLogLinesBatchPayload) error
}
type SessionRepository ¶
type SqliteProvider ¶
type SqliteProvider struct {
// contains filtered or unexported fields
}
func NewSqliteProvider ¶
func NewSqliteProvider(dbPath string) (*SqliteProvider, error)
NewSqliteProvider creates a sqlite based provider.
func (*SqliteProvider) CreateParsedTable ¶
func (p *SqliteProvider) CreateParsedTable( ctx context.Context, opts *CreateParsedTableOpts, ) error
func (*SqliteProvider) CreateSession ¶
func (p *SqliteProvider) CreateSession( ctx context.Context, opts *CreateSessionOpts, ) (string, Session, error)
func (*SqliteProvider) GetQueryService ¶
func (p *SqliteProvider) GetQueryService() (QueryService, error)
func (*SqliteProvider) GetSessionRepository ¶
func (p *SqliteProvider) GetSessionRepository() (SessionRepository, error)
type SqliteQueryService ¶
type SqliteQueryService struct {
// contains filtered or unexported fields
}
func (*SqliteQueryService) QueryTable ¶
func (qs *SqliteQueryService) QueryTable( ctx context.Context, payload *v1.QueryTableRequest, ) (*v1.QueryTableResponse, error)
type SqliteSession ¶
type SqliteSession struct {
// contains filtered or unexported fields
}
func (*SqliteSession) CreateParsedTable ¶
func (s *SqliteSession) CreateParsedTable(ctx context.Context, opts *CreateParsedTableOpts) error
func (*SqliteSession) WriteLogLinesBatch ¶
func (s *SqliteSession) WriteLogLinesBatch(ctx context.Context, payload WriteLogLinesBatchPayload) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.