Documentation
¶
Overview ¶
Package datasource provides a TraceViz data source for logs traces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
collection represents a single fetched log trace, along with any metadata it requires.
func NewCollection ¶
func NewCollection(lt *logtrace.LogTrace) *Collection
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource implements querydispatcher.dataSource for logs data. It caches the most recently used logs.
func New ¶
func New(cap int, fetcher LogTraceFetcher) (*DataSource, error)
New returns a new DataSource with the specified cache capacity, and using the provided log fetcher.
func (*DataSource) HandleDataSeriesRequests ¶
func (ds *DataSource) HandleDataSeriesRequests(ctx context.Context, globalFilters map[string]*util.V, drb *util.DataResponseBuilder, reqs []*util.DataSeriesRequest) error
HandleDataSeriesRequests handles the provided set of DataSeriesRequests, with the provided global filters. It assembles its responses in the provided DataResponseBuilder.
func (*DataSource) SupportedDataSeriesQueries ¶
func (ds *DataSource) SupportedDataSeriesQueries() []string
SupportedDataSeriesQueries returns the DataSeriesRequest query names supported by DataSource.
type LogTraceFetcher ¶
type LogTraceFetcher interface { // FetchLog fetches the log specified by collectionName, returning a // LogTrace or an error if a failure is encountered. Fetch(ctx context.Context, collectionName string) (*Collection, error) }
LogTraceFetcher describes types capable of fetching log traces by collection name.