id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
123,600 | influxdata/influxdb | tsdb/tsi1/file_set.go | IndexFiles | func (fs *FileSet) IndexFiles() []*IndexFile {
var a []*IndexFile
for _, f := range fs.files {
if f, ok := f.(*IndexFile); ok {
a = append(a, f)
}
}
return a
} | go | func (fs *FileSet) IndexFiles() []*IndexFile {
var a []*IndexFile
for _, f := range fs.files {
if f, ok := f.(*IndexFile); ok {
a = append(a, f)
}
}
return a
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"IndexFiles",
"(",
")",
"[",
"]",
"*",
"IndexFile",
"{",
"var",
"a",
"[",
"]",
"*",
"IndexFile",
"\n",
"for",
"_",
",",
"f",
":=",
"range",
"fs",
".",
"files",
"{",
"if",
"f",
",",
"ok",
":=",
"f",
".",... | // IndexFiles returns all index files from the file set. | [
"IndexFiles",
"returns",
"all",
"index",
"files",
"from",
"the",
"file",
"set",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L152-L160 |
123,601 | influxdata/influxdb | tsdb/tsi1/file_set.go | LastContiguousIndexFilesByLevel | func (fs *FileSet) LastContiguousIndexFilesByLevel(level int) []*IndexFile {
if level == 0 {
return nil
}
var a []*IndexFile
for i := len(fs.files) - 1; i >= 0; i-- {
f := fs.files[i]
// Ignore files above level, stop on files below level.
if level < f.Level() {
continue
} else if level > f.Level() {... | go | func (fs *FileSet) LastContiguousIndexFilesByLevel(level int) []*IndexFile {
if level == 0 {
return nil
}
var a []*IndexFile
for i := len(fs.files) - 1; i >= 0; i-- {
f := fs.files[i]
// Ignore files above level, stop on files below level.
if level < f.Level() {
continue
} else if level > f.Level() {... | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"LastContiguousIndexFilesByLevel",
"(",
"level",
"int",
")",
"[",
"]",
"*",
"IndexFile",
"{",
"if",
"level",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"a",
"[",
"]",
"*",
"IndexFile",
"\n",
"fo... | // LastContiguousIndexFilesByLevel returns the last contiguous files by level.
// These can be used by the compaction scheduler. | [
"LastContiguousIndexFilesByLevel",
"returns",
"the",
"last",
"contiguous",
"files",
"by",
"level",
".",
"These",
"can",
"be",
"used",
"by",
"the",
"compaction",
"scheduler",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L164-L183 |
123,602 | influxdata/influxdb | tsdb/tsi1/file_set.go | Measurement | func (fs *FileSet) Measurement(name []byte) MeasurementElem {
for _, f := range fs.files {
if e := f.Measurement(name); e == nil {
continue
} else if e.Deleted() {
return nil
} else {
return e
}
}
return nil
} | go | func (fs *FileSet) Measurement(name []byte) MeasurementElem {
for _, f := range fs.files {
if e := f.Measurement(name); e == nil {
continue
} else if e.Deleted() {
return nil
} else {
return e
}
}
return nil
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"Measurement",
"(",
"name",
"[",
"]",
"byte",
")",
"MeasurementElem",
"{",
"for",
"_",
",",
"f",
":=",
"range",
"fs",
".",
"files",
"{",
"if",
"e",
":=",
"f",
".",
"Measurement",
"(",
"name",
")",
";",
"e",... | // Measurement returns a measurement by name. | [
"Measurement",
"returns",
"a",
"measurement",
"by",
"name",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L186-L197 |
123,603 | influxdata/influxdb | tsdb/tsi1/file_set.go | MeasurementIterator | func (fs *FileSet) MeasurementIterator() MeasurementIterator {
a := make([]MeasurementIterator, 0, len(fs.files))
for _, f := range fs.files {
itr := f.MeasurementIterator()
if itr != nil {
a = append(a, itr)
}
}
return MergeMeasurementIterators(a...)
} | go | func (fs *FileSet) MeasurementIterator() MeasurementIterator {
a := make([]MeasurementIterator, 0, len(fs.files))
for _, f := range fs.files {
itr := f.MeasurementIterator()
if itr != nil {
a = append(a, itr)
}
}
return MergeMeasurementIterators(a...)
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"MeasurementIterator",
"(",
")",
"MeasurementIterator",
"{",
"a",
":=",
"make",
"(",
"[",
"]",
"MeasurementIterator",
",",
"0",
",",
"len",
"(",
"fs",
".",
"files",
")",
")",
"\n",
"for",
"_",
",",
"f",
":=",
... | // MeasurementIterator returns an iterator over all measurements in the index. | [
"MeasurementIterator",
"returns",
"an",
"iterator",
"over",
"all",
"measurements",
"in",
"the",
"index",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L200-L209 |
123,604 | influxdata/influxdb | tsdb/tsi1/file_set.go | MeasurementSeriesIDIterator | func (fs *FileSet) MeasurementSeriesIDIterator(name []byte) tsdb.SeriesIDIterator {
a := make([]tsdb.SeriesIDIterator, 0, len(fs.files))
for _, f := range fs.files {
itr := f.MeasurementSeriesIDIterator(name)
if itr != nil {
a = append(a, itr)
}
}
return tsdb.MergeSeriesIDIterators(a...)
} | go | func (fs *FileSet) MeasurementSeriesIDIterator(name []byte) tsdb.SeriesIDIterator {
a := make([]tsdb.SeriesIDIterator, 0, len(fs.files))
for _, f := range fs.files {
itr := f.MeasurementSeriesIDIterator(name)
if itr != nil {
a = append(a, itr)
}
}
return tsdb.MergeSeriesIDIterators(a...)
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"MeasurementSeriesIDIterator",
"(",
"name",
"[",
"]",
"byte",
")",
"tsdb",
".",
"SeriesIDIterator",
"{",
"a",
":=",
"make",
"(",
"[",
"]",
"tsdb",
".",
"SeriesIDIterator",
",",
"0",
",",
"len",
"(",
"fs",
".",
... | // MeasurementSeriesIDIterator returns a series iterator for a measurement. | [
"MeasurementSeriesIDIterator",
"returns",
"a",
"series",
"iterator",
"for",
"a",
"measurement",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L224-L233 |
123,605 | influxdata/influxdb | tsdb/tsi1/file_set.go | tagKeysByFilter | func (fs *FileSet) tagKeysByFilter(name []byte, op influxql.Token, val []byte, regex *regexp.Regexp) map[string]struct{} {
ss := make(map[string]struct{})
itr := fs.TagKeyIterator(name)
if itr != nil {
for e := itr.Next(); e != nil; e = itr.Next() {
var matched bool
switch op {
case influxql.EQ:
match... | go | func (fs *FileSet) tagKeysByFilter(name []byte, op influxql.Token, val []byte, regex *regexp.Regexp) map[string]struct{} {
ss := make(map[string]struct{})
itr := fs.TagKeyIterator(name)
if itr != nil {
for e := itr.Next(); e != nil; e = itr.Next() {
var matched bool
switch op {
case influxql.EQ:
match... | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"tagKeysByFilter",
"(",
"name",
"[",
"]",
"byte",
",",
"op",
"influxql",
".",
"Token",
",",
"val",
"[",
"]",
"byte",
",",
"regex",
"*",
"regexp",
".",
"Regexp",
")",
"map",
"[",
"string",
"]",
"struct",
"{",
... | // tagKeysByFilter will filter the tag keys for the measurement. | [
"tagKeysByFilter",
"will",
"filter",
"the",
"tag",
"keys",
"for",
"the",
"measurement",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L307-L331 |
123,606 | influxdata/influxdb | tsdb/tsi1/file_set.go | HasTagKey | func (fs *FileSet) HasTagKey(name, key []byte) bool {
for _, f := range fs.files {
if e := f.TagKey(name, key); e != nil {
return !e.Deleted()
}
}
return false
} | go | func (fs *FileSet) HasTagKey(name, key []byte) bool {
for _, f := range fs.files {
if e := f.TagKey(name, key); e != nil {
return !e.Deleted()
}
}
return false
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"HasTagKey",
"(",
"name",
",",
"key",
"[",
"]",
"byte",
")",
"bool",
"{",
"for",
"_",
",",
"f",
":=",
"range",
"fs",
".",
"files",
"{",
"if",
"e",
":=",
"f",
".",
"TagKey",
"(",
"name",
",",
"key",
")",... | // HasTagKey returns true if the tag key exists. | [
"HasTagKey",
"returns",
"true",
"if",
"the",
"tag",
"key",
"exists",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L346-L353 |
123,607 | influxdata/influxdb | tsdb/tsi1/file_set.go | HasTagValue | func (fs *FileSet) HasTagValue(name, key, value []byte) bool {
for _, f := range fs.files {
if e := f.TagValue(name, key, value); e != nil {
return !e.Deleted()
}
}
return false
} | go | func (fs *FileSet) HasTagValue(name, key, value []byte) bool {
for _, f := range fs.files {
if e := f.TagValue(name, key, value); e != nil {
return !e.Deleted()
}
}
return false
} | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"HasTagValue",
"(",
"name",
",",
"key",
",",
"value",
"[",
"]",
"byte",
")",
"bool",
"{",
"for",
"_",
",",
"f",
":=",
"range",
"fs",
".",
"files",
"{",
"if",
"e",
":=",
"f",
".",
"TagValue",
"(",
"name",
... | // HasTagValue returns true if the tag value exists. | [
"HasTagValue",
"returns",
"true",
"if",
"the",
"tag",
"value",
"exists",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L356-L363 |
123,608 | influxdata/influxdb | tsdb/tsi1/file_set.go | Stats | func (fs *FileSet) Stats() MeasurementCardinalityStats {
stats := make(MeasurementCardinalityStats)
mitr := fs.MeasurementIterator()
if mitr == nil {
return stats
}
for {
// Iterate over each measurement and set cardinality.
mm := mitr.Next()
if mm == nil {
return stats
}
// Obtain all series for ... | go | func (fs *FileSet) Stats() MeasurementCardinalityStats {
stats := make(MeasurementCardinalityStats)
mitr := fs.MeasurementIterator()
if mitr == nil {
return stats
}
for {
// Iterate over each measurement and set cardinality.
mm := mitr.Next()
if mm == nil {
return stats
}
// Obtain all series for ... | [
"func",
"(",
"fs",
"*",
"FileSet",
")",
"Stats",
"(",
")",
"MeasurementCardinalityStats",
"{",
"stats",
":=",
"make",
"(",
"MeasurementCardinalityStats",
")",
"\n",
"mitr",
":=",
"fs",
".",
"MeasurementIterator",
"(",
")",
"\n",
"if",
"mitr",
"==",
"nil",
... | // Stats computes aggregate measurement cardinality stats from the raw index data. | [
"Stats",
"computes",
"aggregate",
"measurement",
"cardinality",
"stats",
"from",
"the",
"raw",
"index",
"data",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/file_set.go#L407-L437 |
123,609 | influxdata/influxdb | storage/wal/wal.go | SetDefaultMetricLabels | func (l *WAL) SetDefaultMetricLabels(labels prometheus.Labels) {
l.defaultMetricLabels = make(prometheus.Labels, len(labels))
for k, v := range labels {
l.defaultMetricLabels[k] = v
}
} | go | func (l *WAL) SetDefaultMetricLabels(labels prometheus.Labels) {
l.defaultMetricLabels = make(prometheus.Labels, len(labels))
for k, v := range labels {
l.defaultMetricLabels[k] = v
}
} | [
"func",
"(",
"l",
"*",
"WAL",
")",
"SetDefaultMetricLabels",
"(",
"labels",
"prometheus",
".",
"Labels",
")",
"{",
"l",
".",
"defaultMetricLabels",
"=",
"make",
"(",
"prometheus",
".",
"Labels",
",",
"len",
"(",
"labels",
")",
")",
"\n",
"for",
"k",
",... | // SetDefaultMetricLabels sets the default labels for metrics on the engine.
// It must be called before the Engine is opened. | [
"SetDefaultMetricLabels",
"sets",
"the",
"default",
"labels",
"for",
"metrics",
"on",
"the",
"engine",
".",
"It",
"must",
"be",
"called",
"before",
"the",
"Engine",
"is",
"opened",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L151-L156 |
123,610 | influxdata/influxdb | storage/wal/wal.go | Path | func (l *WAL) Path() string {
l.mu.RLock()
defer l.mu.RUnlock()
return l.path
} | go | func (l *WAL) Path() string {
l.mu.RLock()
defer l.mu.RUnlock()
return l.path
} | [
"func",
"(",
"l",
"*",
"WAL",
")",
"Path",
"(",
")",
"string",
"{",
"l",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"defer",
"l",
".",
"mu",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"l",
".",
"path",
"\n",
"}"
] | // Path returns the directory the log was initialized with. | [
"Path",
"returns",
"the",
"directory",
"the",
"log",
"was",
"initialized",
"with",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L159-L163 |
123,611 | influxdata/influxdb | storage/wal/wal.go | scheduleSync | func (l *WAL) scheduleSync() {
// If we're not the first to sync, then another goroutine is fsyncing the wal for us.
if !atomic.CompareAndSwapUint64(&l.syncCount, 0, 1) {
return
}
// Fsync the wal and notify all pending waiters
go func() {
var timerCh <-chan time.Time
// time.NewTicker requires a > 0 delay... | go | func (l *WAL) scheduleSync() {
// If we're not the first to sync, then another goroutine is fsyncing the wal for us.
if !atomic.CompareAndSwapUint64(&l.syncCount, 0, 1) {
return
}
// Fsync the wal and notify all pending waiters
go func() {
var timerCh <-chan time.Time
// time.NewTicker requires a > 0 delay... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"scheduleSync",
"(",
")",
"{",
"// If we're not the first to sync, then another goroutine is fsyncing the wal for us.",
"if",
"!",
"atomic",
".",
"CompareAndSwapUint64",
"(",
"&",
"l",
".",
"syncCount",
",",
"0",
",",
"1",
")",
"... | // scheduleSync will schedule an fsync to the current wal segment and notify any
// waiting gorutines. If an fsync is already scheduled, subsequent calls will
// not schedule a new fsync and will be handle by the existing scheduled fsync. | [
"scheduleSync",
"will",
"schedule",
"an",
"fsync",
"to",
"the",
"current",
"wal",
"segment",
"and",
"notify",
"any",
"waiting",
"gorutines",
".",
"If",
"an",
"fsync",
"is",
"already",
"scheduled",
"subsequent",
"calls",
"will",
"not",
"schedule",
"a",
"new",
... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L256-L297 |
123,612 | influxdata/influxdb | storage/wal/wal.go | sync | func (l *WAL) sync() {
err := l.currentSegmentWriter.sync()
for len(l.syncWaiters) > 0 {
errC := <-l.syncWaiters
errC <- err
}
} | go | func (l *WAL) sync() {
err := l.currentSegmentWriter.sync()
for len(l.syncWaiters) > 0 {
errC := <-l.syncWaiters
errC <- err
}
} | [
"func",
"(",
"l",
"*",
"WAL",
")",
"sync",
"(",
")",
"{",
"err",
":=",
"l",
".",
"currentSegmentWriter",
".",
"sync",
"(",
")",
"\n",
"for",
"len",
"(",
"l",
".",
"syncWaiters",
")",
">",
"0",
"{",
"errC",
":=",
"<-",
"l",
".",
"syncWaiters",
"... | // sync fsyncs the current wal segments and notifies any waiters. Callers must ensure
// a write lock on the WAL is obtained before calling sync. | [
"sync",
"fsyncs",
"the",
"current",
"wal",
"segments",
"and",
"notifies",
"any",
"waiters",
".",
"Callers",
"must",
"ensure",
"a",
"write",
"lock",
"on",
"the",
"WAL",
"is",
"obtained",
"before",
"calling",
"sync",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L301-L307 |
123,613 | influxdata/influxdb | storage/wal/wal.go | WriteMulti | func (l *WAL) WriteMulti(ctx context.Context, values map[string][]value.Value) (int, error) {
span, _ := tracing.StartSpanFromContext(ctx)
defer span.Finish()
if !l.enabled {
return -1, nil
}
entry := &WriteWALEntry{
Values: values,
}
id, err := l.writeToLog(entry)
if err != nil {
l.tracker.IncWritesEr... | go | func (l *WAL) WriteMulti(ctx context.Context, values map[string][]value.Value) (int, error) {
span, _ := tracing.StartSpanFromContext(ctx)
defer span.Finish()
if !l.enabled {
return -1, nil
}
entry := &WriteWALEntry{
Values: values,
}
id, err := l.writeToLog(entry)
if err != nil {
l.tracker.IncWritesEr... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"WriteMulti",
"(",
"ctx",
"context",
".",
"Context",
",",
"values",
"map",
"[",
"string",
"]",
"[",
"]",
"value",
".",
"Value",
")",
"(",
"int",
",",
"error",
")",
"{",
"span",
",",
"_",
":=",
"tracing",
".",
... | // WriteMulti writes the given values to the WAL. It returns the WAL segment ID to
// which the points were written. If an error is returned the segment ID should
// be ignored. If the WAL is disabled, -1 and nil is returned. | [
"WriteMulti",
"writes",
"the",
"given",
"values",
"to",
"the",
"WAL",
".",
"It",
"returns",
"the",
"WAL",
"segment",
"ID",
"to",
"which",
"the",
"points",
"were",
"written",
".",
"If",
"an",
"error",
"is",
"returned",
"the",
"segment",
"ID",
"should",
"b... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L312-L332 |
123,614 | influxdata/influxdb | storage/wal/wal.go | LastWriteTime | func (l *WAL) LastWriteTime() time.Time {
l.mu.RLock()
defer l.mu.RUnlock()
return l.lastWriteTime
} | go | func (l *WAL) LastWriteTime() time.Time {
l.mu.RLock()
defer l.mu.RUnlock()
return l.lastWriteTime
} | [
"func",
"(",
"l",
"*",
"WAL",
")",
"LastWriteTime",
"(",
")",
"time",
".",
"Time",
"{",
"l",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"defer",
"l",
".",
"mu",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"l",
".",
"lastWriteTime",
"\n",
"}"
] | // LastWriteTime is the last time anything was written to the WAL. | [
"LastWriteTime",
"is",
"the",
"last",
"time",
"anything",
"was",
"written",
"to",
"the",
"WAL",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L409-L413 |
123,615 | influxdata/influxdb | storage/wal/wal.go | DiskSizeBytes | func (l *WAL) DiskSizeBytes() int64 {
return int64(l.tracker.OldSegmentSize() + l.tracker.CurrentSegmentSize())
} | go | func (l *WAL) DiskSizeBytes() int64 {
return int64(l.tracker.OldSegmentSize() + l.tracker.CurrentSegmentSize())
} | [
"func",
"(",
"l",
"*",
"WAL",
")",
"DiskSizeBytes",
"(",
")",
"int64",
"{",
"return",
"int64",
"(",
"l",
".",
"tracker",
".",
"OldSegmentSize",
"(",
")",
"+",
"l",
".",
"tracker",
".",
"CurrentSegmentSize",
"(",
")",
")",
"\n",
"}"
] | // DiskSizeBytes returns the on-disk size of the WAL. | [
"DiskSizeBytes",
"returns",
"the",
"on",
"-",
"disk",
"size",
"of",
"the",
"WAL",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L416-L418 |
123,616 | influxdata/influxdb | storage/wal/wal.go | rollSegment | func (l *WAL) rollSegment() error {
if l.currentSegmentWriter == nil || l.currentSegmentWriter.size > DefaultSegmentSize {
if err := l.newSegmentFile(); err != nil {
// A drop database or RP call could trigger this error if writes were in-flight
// when the drop statement executes.
return fmt.Errorf("error ... | go | func (l *WAL) rollSegment() error {
if l.currentSegmentWriter == nil || l.currentSegmentWriter.size > DefaultSegmentSize {
if err := l.newSegmentFile(); err != nil {
// A drop database or RP call could trigger this error if writes were in-flight
// when the drop statement executes.
return fmt.Errorf("error ... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"rollSegment",
"(",
")",
"error",
"{",
"if",
"l",
".",
"currentSegmentWriter",
"==",
"nil",
"||",
"l",
".",
"currentSegmentWriter",
".",
"size",
">",
"DefaultSegmentSize",
"{",
"if",
"err",
":=",
"l",
".",
"newSegmentFi... | // rollSegment checks if the current segment is due to roll over to a new segment;
// and if so, opens a new segment file for future writes. | [
"rollSegment",
"checks",
"if",
"the",
"current",
"segment",
"is",
"due",
"to",
"roll",
"over",
"to",
"a",
"new",
"segment",
";",
"and",
"if",
"so",
"opens",
"a",
"new",
"segment",
"file",
"for",
"future",
"writes",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L487-L498 |
123,617 | influxdata/influxdb | storage/wal/wal.go | CloseSegment | func (l *WAL) CloseSegment() error {
if !l.enabled {
return nil
}
l.mu.Lock()
defer l.mu.Unlock()
if l.currentSegmentWriter == nil || l.currentSegmentWriter.size > 0 {
if err := l.newSegmentFile(); err != nil {
// A drop database or RP call could trigger this error if writes were in-flight
// when the ... | go | func (l *WAL) CloseSegment() error {
if !l.enabled {
return nil
}
l.mu.Lock()
defer l.mu.Unlock()
if l.currentSegmentWriter == nil || l.currentSegmentWriter.size > 0 {
if err := l.newSegmentFile(); err != nil {
// A drop database or RP call could trigger this error if writes were in-flight
// when the ... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"CloseSegment",
"(",
")",
"error",
"{",
"if",
"!",
"l",
".",
"enabled",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"l",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"mu",
".",
"Unlock",
"(",
")",... | // CloseSegment closes the current segment if it is non-empty and opens a new one. | [
"CloseSegment",
"closes",
"the",
"current",
"segment",
"if",
"it",
"is",
"non",
"-",
"empty",
"and",
"opens",
"a",
"new",
"one",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L501-L518 |
123,618 | influxdata/influxdb | storage/wal/wal.go | DeleteBucketRange | func (l *WAL) DeleteBucketRange(orgID, bucketID influxdb.ID, min, max int64) (int, error) {
if !l.enabled {
return -1, nil
}
entry := &DeleteBucketRangeWALEntry{
OrgID: orgID,
BucketID: bucketID,
Min: min,
Max: max,
}
id, err := l.writeToLog(entry)
if err != nil {
return -1, err
}
ret... | go | func (l *WAL) DeleteBucketRange(orgID, bucketID influxdb.ID, min, max int64) (int, error) {
if !l.enabled {
return -1, nil
}
entry := &DeleteBucketRangeWALEntry{
OrgID: orgID,
BucketID: bucketID,
Min: min,
Max: max,
}
id, err := l.writeToLog(entry)
if err != nil {
return -1, err
}
ret... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"DeleteBucketRange",
"(",
"orgID",
",",
"bucketID",
"influxdb",
".",
"ID",
",",
"min",
",",
"max",
"int64",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"!",
"l",
".",
"enabled",
"{",
"return",
"-",
"1",
",",
... | // DeleteBucketRange deletes the data inside of the bucket between the two times, returning
// the segment ID for the operation. | [
"DeleteBucketRange",
"deletes",
"the",
"data",
"inside",
"of",
"the",
"bucket",
"between",
"the",
"two",
"times",
"returning",
"the",
"segment",
"ID",
"for",
"the",
"operation",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L522-L539 |
123,619 | influxdata/influxdb | storage/wal/wal.go | newSegmentFile | func (l *WAL) newSegmentFile() error {
l.currentSegmentID++
if l.currentSegmentWriter != nil {
l.sync()
if err := l.currentSegmentWriter.close(); err != nil {
return err
}
l.tracker.SetOldSegmentSize(uint64(l.currentSegmentWriter.size))
}
fileName := filepath.Join(l.path, fmt.Sprintf("%s%05d.%s", WALFi... | go | func (l *WAL) newSegmentFile() error {
l.currentSegmentID++
if l.currentSegmentWriter != nil {
l.sync()
if err := l.currentSegmentWriter.close(); err != nil {
return err
}
l.tracker.SetOldSegmentSize(uint64(l.currentSegmentWriter.size))
}
fileName := filepath.Join(l.path, fmt.Sprintf("%s%05d.%s", WALFi... | [
"func",
"(",
"l",
"*",
"WAL",
")",
"newSegmentFile",
"(",
")",
"error",
"{",
"l",
".",
"currentSegmentID",
"++",
"\n",
"if",
"l",
".",
"currentSegmentWriter",
"!=",
"nil",
"{",
"l",
".",
"sync",
"(",
")",
"\n\n",
"if",
"err",
":=",
"l",
".",
"curre... | // newSegmentFile will close the current segment file and open a new one, updating bookkeeping info on the log. | [
"newSegmentFile",
"will",
"close",
"the",
"current",
"segment",
"file",
"and",
"open",
"a",
"new",
"one",
"updating",
"bookkeeping",
"info",
"on",
"the",
"log",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L580-L602 |
123,620 | influxdata/influxdb | storage/wal/wal.go | SetOldSegmentSize | func (t *walTracker) SetOldSegmentSize(sz uint64) {
atomic.StoreUint64(&t.oldSegmentBytes, sz)
labels := t.labels
t.metrics.OldSegmentBytes.With(labels).Set(float64(sz))
} | go | func (t *walTracker) SetOldSegmentSize(sz uint64) {
atomic.StoreUint64(&t.oldSegmentBytes, sz)
labels := t.labels
t.metrics.OldSegmentBytes.With(labels).Set(float64(sz))
} | [
"func",
"(",
"t",
"*",
"walTracker",
")",
"SetOldSegmentSize",
"(",
"sz",
"uint64",
")",
"{",
"atomic",
".",
"StoreUint64",
"(",
"&",
"t",
".",
"oldSegmentBytes",
",",
"sz",
")",
"\n\n",
"labels",
":=",
"t",
".",
"labels",
"\n",
"t",
".",
"metrics",
... | // SetOldSegmentSize sets the size of all old segments on disk. | [
"SetOldSegmentSize",
"sets",
"the",
"size",
"of",
"all",
"old",
"segments",
"on",
"disk",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L646-L651 |
123,621 | influxdata/influxdb | storage/wal/wal.go | SetCurrentSegmentSize | func (t *walTracker) SetCurrentSegmentSize(sz uint64) {
atomic.StoreUint64(&t.oldSegmentBytes, sz)
labels := t.labels
t.metrics.CurrentSegmentBytes.With(labels).Set(float64(sz))
} | go | func (t *walTracker) SetCurrentSegmentSize(sz uint64) {
atomic.StoreUint64(&t.oldSegmentBytes, sz)
labels := t.labels
t.metrics.CurrentSegmentBytes.With(labels).Set(float64(sz))
} | [
"func",
"(",
"t",
"*",
"walTracker",
")",
"SetCurrentSegmentSize",
"(",
"sz",
"uint64",
")",
"{",
"atomic",
".",
"StoreUint64",
"(",
"&",
"t",
".",
"oldSegmentBytes",
",",
"sz",
")",
"\n\n",
"labels",
":=",
"t",
".",
"labels",
"\n",
"t",
".",
"metrics"... | // SetCurrentSegmentSize sets the size of all old segments on disk. | [
"SetCurrentSegmentSize",
"sets",
"the",
"size",
"of",
"all",
"old",
"segments",
"on",
"disk",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L657-L662 |
123,622 | influxdata/influxdb | storage/wal/wal.go | SetSegments | func (t *walTracker) SetSegments(sz uint64) {
labels := t.labels
t.metrics.Segments.With(labels).Set(float64(sz))
} | go | func (t *walTracker) SetSegments(sz uint64) {
labels := t.labels
t.metrics.Segments.With(labels).Set(float64(sz))
} | [
"func",
"(",
"t",
"*",
"walTracker",
")",
"SetSegments",
"(",
"sz",
"uint64",
")",
"{",
"labels",
":=",
"t",
".",
"labels",
"\n",
"t",
".",
"metrics",
".",
"Segments",
".",
"With",
"(",
"labels",
")",
".",
"Set",
"(",
"float64",
"(",
"sz",
")",
"... | // SetSegments sets the number of segments files on disk. | [
"SetSegments",
"sets",
"the",
"number",
"of",
"segments",
"files",
"on",
"disk",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L668-L671 |
123,623 | influxdata/influxdb | storage/wal/wal.go | IncSegments | func (t *walTracker) IncSegments() {
labels := t.labels
t.metrics.Segments.With(labels).Inc()
} | go | func (t *walTracker) IncSegments() {
labels := t.labels
t.metrics.Segments.With(labels).Inc()
} | [
"func",
"(",
"t",
"*",
"walTracker",
")",
"IncSegments",
"(",
")",
"{",
"labels",
":=",
"t",
".",
"labels",
"\n",
"t",
".",
"metrics",
".",
"Segments",
".",
"With",
"(",
"labels",
")",
".",
"Inc",
"(",
")",
"\n",
"}"
] | // IncSegments increases the number of segments files by one. | [
"IncSegments",
"increases",
"the",
"number",
"of",
"segments",
"files",
"by",
"one",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L674-L677 |
123,624 | influxdata/influxdb | storage/wal/wal.go | DecSegments | func (t *walTracker) DecSegments() {
labels := t.labels
t.metrics.Segments.With(labels).Dec()
} | go | func (t *walTracker) DecSegments() {
labels := t.labels
t.metrics.Segments.With(labels).Dec()
} | [
"func",
"(",
"t",
"*",
"walTracker",
")",
"DecSegments",
"(",
")",
"{",
"labels",
":=",
"t",
".",
"labels",
"\n",
"t",
".",
"metrics",
".",
"Segments",
".",
"With",
"(",
"labels",
")",
".",
"Dec",
"(",
")",
"\n",
"}"
] | // DecSegments decreases the number of segments files by one. | [
"DecSegments",
"decreases",
"the",
"number",
"of",
"segments",
"files",
"by",
"one",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L680-L683 |
123,625 | influxdata/influxdb | storage/wal/wal.go | MarshalBinary | func (w *DeleteBucketRangeWALEntry) MarshalBinary() ([]byte, error) {
b := make([]byte, w.MarshalSize())
return w.Encode(b)
} | go | func (w *DeleteBucketRangeWALEntry) MarshalBinary() ([]byte, error) {
b := make([]byte, w.MarshalSize())
return w.Encode(b)
} | [
"func",
"(",
"w",
"*",
"DeleteBucketRangeWALEntry",
")",
"MarshalBinary",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"b",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"w",
".",
"MarshalSize",
"(",
")",
")",
"\n",
"return",
"w",
".",
"E... | // MarshalBinary returns a binary representation of the entry in a new byte slice. | [
"MarshalBinary",
"returns",
"a",
"binary",
"representation",
"of",
"the",
"entry",
"in",
"a",
"new",
"byte",
"slice",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1001-L1004 |
123,626 | influxdata/influxdb | storage/wal/wal.go | Encode | func (w *DeleteBucketRangeWALEntry) Encode(b []byte) ([]byte, error) {
sz := w.MarshalSize()
if len(b) < sz {
b = make([]byte, sz)
}
orgID, err := w.OrgID.Encode()
if err != nil {
return nil, err
}
bucketID, err := w.BucketID.Encode()
if err != nil {
return nil, err
}
copy(b, orgID)
copy(b[influxdb.I... | go | func (w *DeleteBucketRangeWALEntry) Encode(b []byte) ([]byte, error) {
sz := w.MarshalSize()
if len(b) < sz {
b = make([]byte, sz)
}
orgID, err := w.OrgID.Encode()
if err != nil {
return nil, err
}
bucketID, err := w.BucketID.Encode()
if err != nil {
return nil, err
}
copy(b, orgID)
copy(b[influxdb.I... | [
"func",
"(",
"w",
"*",
"DeleteBucketRangeWALEntry",
")",
"Encode",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"sz",
":=",
"w",
".",
"MarshalSize",
"(",
")",
"\n",
"if",
"len",
"(",
"b",
")",
"<",
"sz",
"{",
... | // Encode converts the entry into a byte stream using b if it is large enough.
// If b is too small, a newly allocated slice is returned. | [
"Encode",
"converts",
"the",
"entry",
"into",
"a",
"byte",
"stream",
"using",
"b",
"if",
"it",
"is",
"large",
"enough",
".",
"If",
"b",
"is",
"too",
"small",
"a",
"newly",
"allocated",
"slice",
"is",
"returned",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1031-L1052 |
123,627 | influxdata/influxdb | storage/wal/wal.go | NewWALSegmentWriter | func NewWALSegmentWriter(w io.WriteCloser) *WALSegmentWriter {
return &WALSegmentWriter{
bw: bufio.NewWriterSize(w, 16*1024),
w: w,
}
} | go | func NewWALSegmentWriter(w io.WriteCloser) *WALSegmentWriter {
return &WALSegmentWriter{
bw: bufio.NewWriterSize(w, 16*1024),
w: w,
}
} | [
"func",
"NewWALSegmentWriter",
"(",
"w",
"io",
".",
"WriteCloser",
")",
"*",
"WALSegmentWriter",
"{",
"return",
"&",
"WALSegmentWriter",
"{",
"bw",
":",
"bufio",
".",
"NewWriterSize",
"(",
"w",
",",
"16",
"*",
"1024",
")",
",",
"w",
":",
"w",
",",
"}",... | // NewWALSegmentWriter returns a new WALSegmentWriter writing to w. | [
"NewWALSegmentWriter",
"returns",
"a",
"new",
"WALSegmentWriter",
"writing",
"to",
"w",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1067-L1072 |
123,628 | influxdata/influxdb | storage/wal/wal.go | Write | func (w *WALSegmentWriter) Write(entryType WalEntryType, compressed []byte) error {
var buf [5]byte
buf[0] = byte(entryType)
binary.BigEndian.PutUint32(buf[1:5], uint32(len(compressed)))
if _, err := w.bw.Write(buf[:]); err != nil {
return err
}
if _, err := w.bw.Write(compressed); err != nil {
return err
... | go | func (w *WALSegmentWriter) Write(entryType WalEntryType, compressed []byte) error {
var buf [5]byte
buf[0] = byte(entryType)
binary.BigEndian.PutUint32(buf[1:5], uint32(len(compressed)))
if _, err := w.bw.Write(buf[:]); err != nil {
return err
}
if _, err := w.bw.Write(compressed); err != nil {
return err
... | [
"func",
"(",
"w",
"*",
"WALSegmentWriter",
")",
"Write",
"(",
"entryType",
"WalEntryType",
",",
"compressed",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"buf",
"[",
"5",
"]",
"byte",
"\n",
"buf",
"[",
"0",
"]",
"=",
"byte",
"(",
"entryType",
")",
... | // Write writes entryType and the buffer containing compressed entry data. | [
"Write",
"writes",
"entryType",
"and",
"the",
"buffer",
"containing",
"compressed",
"entry",
"data",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1082-L1098 |
123,629 | influxdata/influxdb | storage/wal/wal.go | sync | func (w *WALSegmentWriter) sync() error {
if err := w.bw.Flush(); err != nil {
return err
}
if f, ok := w.w.(*os.File); ok {
return f.Sync()
}
return nil
} | go | func (w *WALSegmentWriter) sync() error {
if err := w.bw.Flush(); err != nil {
return err
}
if f, ok := w.w.(*os.File); ok {
return f.Sync()
}
return nil
} | [
"func",
"(",
"w",
"*",
"WALSegmentWriter",
")",
"sync",
"(",
")",
"error",
"{",
"if",
"err",
":=",
"w",
".",
"bw",
".",
"Flush",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"if",
"f",
",",
"ok",
":=",
"w",
".",... | // Sync flushes the file systems in-memory copy of recently written data to disk,
// if w is writing to an os.File. | [
"Sync",
"flushes",
"the",
"file",
"systems",
"in",
"-",
"memory",
"copy",
"of",
"recently",
"written",
"data",
"to",
"disk",
"if",
"w",
"is",
"writing",
"to",
"an",
"os",
".",
"File",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1102-L1111 |
123,630 | influxdata/influxdb | storage/wal/wal.go | NewWALSegmentReader | func NewWALSegmentReader(r io.ReadCloser) *WALSegmentReader {
return &WALSegmentReader{
rc: r,
r: bufio.NewReader(r),
}
} | go | func NewWALSegmentReader(r io.ReadCloser) *WALSegmentReader {
return &WALSegmentReader{
rc: r,
r: bufio.NewReader(r),
}
} | [
"func",
"NewWALSegmentReader",
"(",
"r",
"io",
".",
"ReadCloser",
")",
"*",
"WALSegmentReader",
"{",
"return",
"&",
"WALSegmentReader",
"{",
"rc",
":",
"r",
",",
"r",
":",
"bufio",
".",
"NewReader",
"(",
"r",
")",
",",
"}",
"\n",
"}"
] | // NewWALSegmentReader returns a new WALSegmentReader reading from r. | [
"NewWALSegmentReader",
"returns",
"a",
"new",
"WALSegmentReader",
"reading",
"from",
"r",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1134-L1139 |
123,631 | influxdata/influxdb | storage/wal/wal.go | Read | func (r *WALSegmentReader) Read() (WALEntry, error) {
if r.err != nil {
return nil, r.err
}
return r.entry, nil
} | go | func (r *WALSegmentReader) Read() (WALEntry, error) {
if r.err != nil {
return nil, r.err
}
return r.entry, nil
} | [
"func",
"(",
"r",
"*",
"WALSegmentReader",
")",
"Read",
"(",
")",
"(",
"WALEntry",
",",
"error",
")",
"{",
"if",
"r",
".",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"r",
".",
"err",
"\n",
"}",
"\n",
"return",
"r",
".",
"entry",
",",
"nil",... | // Read returns the next entry in the reader. | [
"Read",
"returns",
"the",
"next",
"entry",
"in",
"the",
"reader",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1218-L1223 |
123,632 | influxdata/influxdb | storage/wal/wal.go | Close | func (r *WALSegmentReader) Close() error {
if r.rc == nil {
return nil
}
err := r.rc.Close()
r.rc = nil
return err
} | go | func (r *WALSegmentReader) Close() error {
if r.rc == nil {
return nil
}
err := r.rc.Close()
r.rc = nil
return err
} | [
"func",
"(",
"r",
"*",
"WALSegmentReader",
")",
"Close",
"(",
")",
"error",
"{",
"if",
"r",
".",
"rc",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"err",
":=",
"r",
".",
"rc",
".",
"Close",
"(",
")",
"\n",
"r",
".",
"rc",
"=",
"nil",
... | // Close closes the underlying io.Reader. | [
"Close",
"closes",
"the",
"underlying",
"io",
".",
"Reader",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1238-L1245 |
123,633 | influxdata/influxdb | storage/wal/wal.go | idFromFileName | func idFromFileName(name string) (int, error) {
parts := strings.Split(filepath.Base(name), ".")
if len(parts) != 2 {
return 0, fmt.Errorf("file %s has wrong name format to have an id", name)
}
id, err := strconv.ParseUint(parts[0][1:], 10, 32)
return int(id), err
} | go | func idFromFileName(name string) (int, error) {
parts := strings.Split(filepath.Base(name), ".")
if len(parts) != 2 {
return 0, fmt.Errorf("file %s has wrong name format to have an id", name)
}
id, err := strconv.ParseUint(parts[0][1:], 10, 32)
return int(id), err
} | [
"func",
"idFromFileName",
"(",
"name",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"parts",
":=",
"strings",
".",
"Split",
"(",
"filepath",
".",
"Base",
"(",
"name",
")",
",",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"parts",
")",
"!=",
"2... | // idFromFileName parses the segment file ID from its name. | [
"idFromFileName",
"parses",
"the",
"segment",
"file",
"ID",
"from",
"its",
"name",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/storage/wal/wal.go#L1248-L1257 |
123,634 | influxdata/influxdb | paging.go | QueryParams | func (f FindOptions) QueryParams() map[string][]string {
qp := map[string][]string{
"offset": {strconv.Itoa(f.Offset)},
"descending": {strconv.FormatBool(f.Descending)},
}
if f.Limit > 0 {
qp["limit"] = []string{strconv.Itoa(f.Limit)}
}
if f.SortBy != "" {
qp["sortBy"] = []string{f.SortBy}
}
retur... | go | func (f FindOptions) QueryParams() map[string][]string {
qp := map[string][]string{
"offset": {strconv.Itoa(f.Offset)},
"descending": {strconv.FormatBool(f.Descending)},
}
if f.Limit > 0 {
qp["limit"] = []string{strconv.Itoa(f.Limit)}
}
if f.SortBy != "" {
qp["sortBy"] = []string{f.SortBy}
}
retur... | [
"func",
"(",
"f",
"FindOptions",
")",
"QueryParams",
"(",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"{",
"qp",
":=",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"{",
"\"",
"\"",
":",
"{",
"strconv",
".",
"Itoa",
"(",
"f",
".",
"Off... | // QueryParams returns a map containing url query params. | [
"QueryParams",
"returns",
"a",
"map",
"containing",
"url",
"query",
"params",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/paging.go#L34-L49 |
123,635 | influxdata/influxdb | tsdb/tsi1/tsi1.go | NewTSDBMeasurementIteratorAdapter | func NewTSDBMeasurementIteratorAdapter(itr MeasurementIterator) tsdb.MeasurementIterator {
if itr == nil {
return nil
}
return &tsdbMeasurementIteratorAdapter{itr: itr}
} | go | func NewTSDBMeasurementIteratorAdapter(itr MeasurementIterator) tsdb.MeasurementIterator {
if itr == nil {
return nil
}
return &tsdbMeasurementIteratorAdapter{itr: itr}
} | [
"func",
"NewTSDBMeasurementIteratorAdapter",
"(",
"itr",
"MeasurementIterator",
")",
"tsdb",
".",
"MeasurementIterator",
"{",
"if",
"itr",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"tsdbMeasurementIteratorAdapter",
"{",
"itr",
":",
"itr",
... | // NewTSDBMeasurementIteratorAdapter return an iterator which implements tsdb.MeasurementIterator. | [
"NewTSDBMeasurementIteratorAdapter",
"return",
"an",
"iterator",
"which",
"implements",
"tsdb",
".",
"MeasurementIterator",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L121-L126 |
123,636 | influxdata/influxdb | tsdb/tsi1/tsi1.go | NewTSDBTagKeyIteratorAdapter | func NewTSDBTagKeyIteratorAdapter(itr TagKeyIterator) tsdb.TagKeyIterator {
if itr == nil {
return nil
}
return &tsdbTagKeyIteratorAdapter{itr: itr}
} | go | func NewTSDBTagKeyIteratorAdapter(itr TagKeyIterator) tsdb.TagKeyIterator {
if itr == nil {
return nil
}
return &tsdbTagKeyIteratorAdapter{itr: itr}
} | [
"func",
"NewTSDBTagKeyIteratorAdapter",
"(",
"itr",
"TagKeyIterator",
")",
"tsdb",
".",
"TagKeyIterator",
"{",
"if",
"itr",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"tsdbTagKeyIteratorAdapter",
"{",
"itr",
":",
"itr",
"}",
"\n",
"}"... | // NewTSDBTagKeyIteratorAdapter return an iterator which implements tsdb.TagKeyIterator. | [
"NewTSDBTagKeyIteratorAdapter",
"return",
"an",
"iterator",
"which",
"implements",
"tsdb",
".",
"TagKeyIterator",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L161-L166 |
123,637 | influxdata/influxdb | tsdb/tsi1/tsi1.go | MergeTagKeyIterators | func MergeTagKeyIterators(itrs ...TagKeyIterator) TagKeyIterator {
if len(itrs) == 0 {
return nil
}
return &tagKeyMergeIterator{
e: make(tagKeyMergeElem, 0, len(itrs)),
buf: make([]TagKeyElem, len(itrs)),
itrs: itrs,
}
} | go | func MergeTagKeyIterators(itrs ...TagKeyIterator) TagKeyIterator {
if len(itrs) == 0 {
return nil
}
return &tagKeyMergeIterator{
e: make(tagKeyMergeElem, 0, len(itrs)),
buf: make([]TagKeyElem, len(itrs)),
itrs: itrs,
}
} | [
"func",
"MergeTagKeyIterators",
"(",
"itrs",
"...",
"TagKeyIterator",
")",
"TagKeyIterator",
"{",
"if",
"len",
"(",
"itrs",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"return",
"&",
"tagKeyMergeIterator",
"{",
"e",
":",
"make",
"(",
"tagKeyMe... | // MergeTagKeyIterators returns an iterator that merges a set of iterators.
// Iterators that are first in the list take precedence and a deletion by those
// early iterators will invalidate elements by later iterators. | [
"MergeTagKeyIterators",
"returns",
"an",
"iterator",
"that",
"merges",
"a",
"set",
"of",
"iterators",
".",
"Iterators",
"that",
"are",
"first",
"in",
"the",
"list",
"take",
"precedence",
"and",
"a",
"deletion",
"by",
"those",
"early",
"iterators",
"will",
"inv... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L185-L195 |
123,638 | influxdata/influxdb | tsdb/tsi1/tsi1.go | TagValueIterator | func (p tagKeyMergeElem) TagValueIterator() TagValueIterator {
if len(p) == 0 {
return nil
}
a := make([]TagValueIterator, 0, len(p))
for _, e := range p {
itr := e.TagValueIterator()
a = append(a, itr)
if e.Deleted() {
break
}
}
return MergeTagValueIterators(a...)
} | go | func (p tagKeyMergeElem) TagValueIterator() TagValueIterator {
if len(p) == 0 {
return nil
}
a := make([]TagValueIterator, 0, len(p))
for _, e := range p {
itr := e.TagValueIterator()
a = append(a, itr)
if e.Deleted() {
break
}
}
return MergeTagValueIterators(a...)
} | [
"func",
"(",
"p",
"tagKeyMergeElem",
")",
"TagValueIterator",
"(",
")",
"TagValueIterator",
"{",
"if",
"len",
"(",
"p",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"a",
":=",
"make",
"(",
"[",
"]",
"TagValueIterator",
",",
"0",
",",
"len... | // TagValueIterator returns a merge iterator for all elements until a tombstone occurs. | [
"TagValueIterator",
"returns",
"a",
"merge",
"iterator",
"for",
"all",
"elements",
"until",
"a",
"tombstone",
"occurs",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L264-L279 |
123,639 | influxdata/influxdb | tsdb/tsi1/tsi1.go | NewTSDBTagValueIteratorAdapter | func NewTSDBTagValueIteratorAdapter(itr TagValueIterator) tsdb.TagValueIterator {
if itr == nil {
return nil
}
return &tsdbTagValueIteratorAdapter{itr: itr}
} | go | func NewTSDBTagValueIteratorAdapter(itr TagValueIterator) tsdb.TagValueIterator {
if itr == nil {
return nil
}
return &tsdbTagValueIteratorAdapter{itr: itr}
} | [
"func",
"NewTSDBTagValueIteratorAdapter",
"(",
"itr",
"TagValueIterator",
")",
"tsdb",
".",
"TagValueIterator",
"{",
"if",
"itr",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"tsdbTagValueIteratorAdapter",
"{",
"itr",
":",
"itr",
"}",
"\n... | // NewTSDBTagValueIteratorAdapter return an iterator which implements tsdb.TagValueIterator. | [
"NewTSDBTagValueIteratorAdapter",
"return",
"an",
"iterator",
"which",
"implements",
"tsdb",
".",
"TagValueIterator",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L299-L304 |
123,640 | influxdata/influxdb | tsdb/tsi1/tsi1.go | MergeTagValueIterators | func MergeTagValueIterators(itrs ...TagValueIterator) TagValueIterator {
if len(itrs) == 0 {
return nil
}
return &tagValueMergeIterator{
e: make(tagValueMergeElem, 0, len(itrs)),
buf: make([]TagValueElem, len(itrs)),
itrs: itrs,
}
} | go | func MergeTagValueIterators(itrs ...TagValueIterator) TagValueIterator {
if len(itrs) == 0 {
return nil
}
return &tagValueMergeIterator{
e: make(tagValueMergeElem, 0, len(itrs)),
buf: make([]TagValueElem, len(itrs)),
itrs: itrs,
}
} | [
"func",
"MergeTagValueIterators",
"(",
"itrs",
"...",
"TagValueIterator",
")",
"TagValueIterator",
"{",
"if",
"len",
"(",
"itrs",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"return",
"&",
"tagValueMergeIterator",
"{",
"e",
":",
"make",
"(",
"... | // MergeTagValueIterators returns an iterator that merges a set of iterators.
// Iterators that are first in the list take precedence and a deletion by those
// early iterators will invalidate elements by later iterators. | [
"MergeTagValueIterators",
"returns",
"an",
"iterator",
"that",
"merges",
"a",
"set",
"of",
"iterators",
".",
"Iterators",
"that",
"are",
"first",
"in",
"the",
"list",
"take",
"precedence",
"and",
"a",
"deletion",
"by",
"those",
"early",
"iterators",
"will",
"i... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L323-L333 |
123,641 | influxdata/influxdb | tsdb/tsi1/tsi1.go | writeUint8To | func writeUint8To(w io.Writer, v uint8, n *int64) error {
nn, err := w.Write([]byte{v})
*n += int64(nn)
return err
} | go | func writeUint8To(w io.Writer, v uint8, n *int64) error {
nn, err := w.Write([]byte{v})
*n += int64(nn)
return err
} | [
"func",
"writeUint8To",
"(",
"w",
"io",
".",
"Writer",
",",
"v",
"uint8",
",",
"n",
"*",
"int64",
")",
"error",
"{",
"nn",
",",
"err",
":=",
"w",
".",
"Write",
"(",
"[",
"]",
"byte",
"{",
"v",
"}",
")",
"\n",
"*",
"n",
"+=",
"int64",
"(",
"... | // writeUint8To writes write v into w. Updates n. | [
"writeUint8To",
"writes",
"write",
"v",
"into",
"w",
".",
"Updates",
"n",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L483-L487 |
123,642 | influxdata/influxdb | tsdb/tsi1/tsi1.go | writeUint16To | func writeUint16To(w io.Writer, v uint16, n *int64) error {
var buf [2]byte
binary.BigEndian.PutUint16(buf[:], v)
nn, err := w.Write(buf[:])
*n += int64(nn)
return err
} | go | func writeUint16To(w io.Writer, v uint16, n *int64) error {
var buf [2]byte
binary.BigEndian.PutUint16(buf[:], v)
nn, err := w.Write(buf[:])
*n += int64(nn)
return err
} | [
"func",
"writeUint16To",
"(",
"w",
"io",
".",
"Writer",
",",
"v",
"uint16",
",",
"n",
"*",
"int64",
")",
"error",
"{",
"var",
"buf",
"[",
"2",
"]",
"byte",
"\n",
"binary",
".",
"BigEndian",
".",
"PutUint16",
"(",
"buf",
"[",
":",
"]",
",",
"v",
... | // writeUint16To writes write v into w using big endian encoding. Updates n. | [
"writeUint16To",
"writes",
"write",
"v",
"into",
"w",
"using",
"big",
"endian",
"encoding",
".",
"Updates",
"n",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L490-L496 |
123,643 | influxdata/influxdb | tsdb/tsi1/tsi1.go | writeUint64To | func writeUint64To(w io.Writer, v uint64, n *int64) error {
var buf [8]byte
binary.BigEndian.PutUint64(buf[:], v)
nn, err := w.Write(buf[:])
*n += int64(nn)
return err
} | go | func writeUint64To(w io.Writer, v uint64, n *int64) error {
var buf [8]byte
binary.BigEndian.PutUint64(buf[:], v)
nn, err := w.Write(buf[:])
*n += int64(nn)
return err
} | [
"func",
"writeUint64To",
"(",
"w",
"io",
".",
"Writer",
",",
"v",
"uint64",
",",
"n",
"*",
"int64",
")",
"error",
"{",
"var",
"buf",
"[",
"8",
"]",
"byte",
"\n",
"binary",
".",
"BigEndian",
".",
"PutUint64",
"(",
"buf",
"[",
":",
"]",
",",
"v",
... | // writeUint64To writes write v into w using big endian encoding. Updates n. | [
"writeUint64To",
"writes",
"write",
"v",
"into",
"w",
"using",
"big",
"endian",
"encoding",
".",
"Updates",
"n",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L499-L505 |
123,644 | influxdata/influxdb | tsdb/tsi1/tsi1.go | writeUvarintTo | func writeUvarintTo(w io.Writer, v uint64, n *int64) error {
var buf [binary.MaxVarintLen64]byte
i := binary.PutUvarint(buf[:], v)
nn, err := w.Write(buf[:i])
*n += int64(nn)
return err
} | go | func writeUvarintTo(w io.Writer, v uint64, n *int64) error {
var buf [binary.MaxVarintLen64]byte
i := binary.PutUvarint(buf[:], v)
nn, err := w.Write(buf[:i])
*n += int64(nn)
return err
} | [
"func",
"writeUvarintTo",
"(",
"w",
"io",
".",
"Writer",
",",
"v",
"uint64",
",",
"n",
"*",
"int64",
")",
"error",
"{",
"var",
"buf",
"[",
"binary",
".",
"MaxVarintLen64",
"]",
"byte",
"\n",
"i",
":=",
"binary",
".",
"PutUvarint",
"(",
"buf",
"[",
... | // writeUvarintTo writes write v into w using variable length encoding. Updates n. | [
"writeUvarintTo",
"writes",
"write",
"v",
"into",
"w",
"using",
"variable",
"length",
"encoding",
".",
"Updates",
"n",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsi1/tsi1.go#L508-L514 |
123,645 | influxdata/influxdb | inmem/organization_service.go | FindOrganizationByID | func (s *Service) FindOrganizationByID(ctx context.Context, id platform.ID) (*platform.Organization, error) {
o, pe := s.loadOrganization(id)
if pe != nil {
return nil, &platform.Error{
Op: OpPrefix + platform.OpFindOrganizationByID,
Err: pe,
}
}
return o, nil
} | go | func (s *Service) FindOrganizationByID(ctx context.Context, id platform.ID) (*platform.Organization, error) {
o, pe := s.loadOrganization(id)
if pe != nil {
return nil, &platform.Error{
Op: OpPrefix + platform.OpFindOrganizationByID,
Err: pe,
}
}
return o, nil
} | [
"func",
"(",
"s",
"*",
"Service",
")",
"FindOrganizationByID",
"(",
"ctx",
"context",
".",
"Context",
",",
"id",
"platform",
".",
"ID",
")",
"(",
"*",
"platform",
".",
"Organization",
",",
"error",
")",
"{",
"o",
",",
"pe",
":=",
"s",
".",
"loadOrgan... | // FindOrganizationByID returns a single organization by ID. | [
"FindOrganizationByID",
"returns",
"a",
"single",
"organization",
"by",
"ID",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/inmem/organization_service.go#L68-L77 |
123,646 | influxdata/influxdb | inmem/organization_service.go | CreateOrganization | func (s *Service) CreateOrganization(ctx context.Context, o *platform.Organization) error {
op := OpPrefix + platform.OpCreateOrganization
if o.Name = strings.TrimSpace(o.Name); o.Name == "" {
return platform.ErrOrgNameisEmpty
}
if _, err := s.FindOrganization(ctx, platform.OrganizationFilter{Name: &o.Name}); err... | go | func (s *Service) CreateOrganization(ctx context.Context, o *platform.Organization) error {
op := OpPrefix + platform.OpCreateOrganization
if o.Name = strings.TrimSpace(o.Name); o.Name == "" {
return platform.ErrOrgNameisEmpty
}
if _, err := s.FindOrganization(ctx, platform.OrganizationFilter{Name: &o.Name}); err... | [
"func",
"(",
"s",
"*",
"Service",
")",
"CreateOrganization",
"(",
"ctx",
"context",
".",
"Context",
",",
"o",
"*",
"platform",
".",
"Organization",
")",
"error",
"{",
"op",
":=",
"OpPrefix",
"+",
"platform",
".",
"OpCreateOrganization",
"\n",
"if",
"o",
... | // CreateOrganization creates a new organization and sets b.ID with the new identifier. | [
"CreateOrganization",
"creates",
"a",
"new",
"organization",
"and",
"sets",
"b",
".",
"ID",
"with",
"the",
"new",
"identifier",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/inmem/organization_service.go#L181-L202 |
123,647 | influxdata/influxdb | tsdb/tsm1/reader_time_range.go | timeRangesCoverEntries | func timeRangesCoverEntries(merger timeRangeMerger, entries []IndexEntry) (covers bool) {
if len(entries) == 0 {
return true
}
mustCover := entries[0].MinTime
ts, ok := merger.Pop()
for len(entries) > 0 && ok {
switch {
// If the tombstone does not include mustCover, we
// know we do not fully cover ever... | go | func timeRangesCoverEntries(merger timeRangeMerger, entries []IndexEntry) (covers bool) {
if len(entries) == 0 {
return true
}
mustCover := entries[0].MinTime
ts, ok := merger.Pop()
for len(entries) > 0 && ok {
switch {
// If the tombstone does not include mustCover, we
// know we do not fully cover ever... | [
"func",
"timeRangesCoverEntries",
"(",
"merger",
"timeRangeMerger",
",",
"entries",
"[",
"]",
"IndexEntry",
")",
"(",
"covers",
"bool",
")",
"{",
"if",
"len",
"(",
"entries",
")",
"==",
"0",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"mustCover",
":=",
"e... | // timeRangesCoverEntries returns true if the time ranges fully cover the entries. | [
"timeRangesCoverEntries",
"returns",
"true",
"if",
"the",
"time",
"ranges",
"fully",
"cover",
"the",
"entries",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsm1/reader_time_range.go#L23-L58 |
123,648 | influxdata/influxdb | tsdb/tsm1/reader_time_range.go | Pop | func (t *timeRangeMerger) Pop() (out TimeRange, ok bool) {
var where *[]TimeRange
var what []TimeRange
if len(t.sorted) > 0 {
where, what = &t.sorted, t.sorted[1:]
out, ok = t.sorted[0], true
}
if len(t.unsorted) > 0 && (!ok || t.unsorted[0].Less(out)) {
where, what = &t.unsorted, t.unsorted[1:]
out, ok ... | go | func (t *timeRangeMerger) Pop() (out TimeRange, ok bool) {
var where *[]TimeRange
var what []TimeRange
if len(t.sorted) > 0 {
where, what = &t.sorted, t.sorted[1:]
out, ok = t.sorted[0], true
}
if len(t.unsorted) > 0 && (!ok || t.unsorted[0].Less(out)) {
where, what = &t.unsorted, t.unsorted[1:]
out, ok ... | [
"func",
"(",
"t",
"*",
"timeRangeMerger",
")",
"Pop",
"(",
")",
"(",
"out",
"TimeRange",
",",
"ok",
"bool",
")",
"{",
"var",
"where",
"*",
"[",
"]",
"TimeRange",
"\n",
"var",
"what",
"[",
"]",
"TimeRange",
"\n\n",
"if",
"len",
"(",
"t",
".",
"sor... | // Pop returns the next TimeRange in sorted order and a boolean indicating that
// there was a TimeRange to read. | [
"Pop",
"returns",
"the",
"next",
"TimeRange",
"in",
"sorted",
"order",
"and",
"a",
"boolean",
"indicating",
"that",
"there",
"was",
"a",
"TimeRange",
"to",
"read",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsm1/reader_time_range.go#L71-L95 |
123,649 | influxdata/influxdb | telemetry/store.go | WriteMessage | func (s *LogStore) WriteMessage(ctx context.Context, data []byte) error {
s.Logger.Info("write", zap.String("data", string(data)))
return nil
} | go | func (s *LogStore) WriteMessage(ctx context.Context, data []byte) error {
s.Logger.Info("write", zap.String("data", string(data)))
return nil
} | [
"func",
"(",
"s",
"*",
"LogStore",
")",
"WriteMessage",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"s",
".",
"Logger",
".",
"Info",
"(",
"\"",
"\"",
",",
"zap",
".",
"String",
"(",
"\"",
"\"",
",",
... | // WriteMessage logs data at Info level. | [
"WriteMessage",
"logs",
"data",
"at",
"Info",
"level",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/telemetry/store.go#L23-L26 |
123,650 | influxdata/influxdb | zap/proxy_query_service.go | NewProxyQueryService | func NewProxyQueryService(l *zap.Logger) *ProxyQueryService {
if l == nil {
l = zap.NewNop()
}
return &ProxyQueryService{
Logger: l,
}
} | go | func NewProxyQueryService(l *zap.Logger) *ProxyQueryService {
if l == nil {
l = zap.NewNop()
}
return &ProxyQueryService{
Logger: l,
}
} | [
"func",
"NewProxyQueryService",
"(",
"l",
"*",
"zap",
".",
"Logger",
")",
"*",
"ProxyQueryService",
"{",
"if",
"l",
"==",
"nil",
"{",
"l",
"=",
"zap",
".",
"NewNop",
"(",
")",
"\n",
"}",
"\n",
"return",
"&",
"ProxyQueryService",
"{",
"Logger",
":",
"... | // NewProxyQueryService creates a new proxy query service with a logger.
// If the logger is nil, then it will use a noop logger. | [
"NewProxyQueryService",
"creates",
"a",
"new",
"proxy",
"query",
"service",
"with",
"a",
"logger",
".",
"If",
"the",
"logger",
"is",
"nil",
"then",
"it",
"will",
"use",
"a",
"noop",
"logger",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/zap/proxy_query_service.go#L18-L25 |
123,651 | influxdata/influxdb | zap/proxy_query_service.go | Query | func (s *ProxyQueryService) Query(ctx context.Context, w io.Writer, req *query.ProxyRequest) (int64, error) {
if req != nil {
s.Logger.Info("query", zap.Any("request", req))
}
n, err := w.Write([]byte{})
return int64(n), err
} | go | func (s *ProxyQueryService) Query(ctx context.Context, w io.Writer, req *query.ProxyRequest) (int64, error) {
if req != nil {
s.Logger.Info("query", zap.Any("request", req))
}
n, err := w.Write([]byte{})
return int64(n), err
} | [
"func",
"(",
"s",
"*",
"ProxyQueryService",
")",
"Query",
"(",
"ctx",
"context",
".",
"Context",
",",
"w",
"io",
".",
"Writer",
",",
"req",
"*",
"query",
".",
"ProxyRequest",
")",
"(",
"int64",
",",
"error",
")",
"{",
"if",
"req",
"!=",
"nil",
"{",... | // Query logs the query request. | [
"Query",
"logs",
"the",
"query",
"request",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/zap/proxy_query_service.go#L28-L34 |
123,652 | influxdata/influxdb | chronograf/enterprise/users.go | Add | func (c *UserStore) Add(ctx context.Context, u *chronograf.User) (*chronograf.User, error) {
if err := c.Ctrl.CreateUser(ctx, u.Name, u.Passwd); err != nil {
return nil, err
}
perms := ToEnterprise(u.Permissions)
if err := c.Ctrl.SetUserPerms(ctx, u.Name, perms); err != nil {
return nil, err
}
for _, role :=... | go | func (c *UserStore) Add(ctx context.Context, u *chronograf.User) (*chronograf.User, error) {
if err := c.Ctrl.CreateUser(ctx, u.Name, u.Passwd); err != nil {
return nil, err
}
perms := ToEnterprise(u.Permissions)
if err := c.Ctrl.SetUserPerms(ctx, u.Name, perms); err != nil {
return nil, err
}
for _, role :=... | [
"func",
"(",
"c",
"*",
"UserStore",
")",
"Add",
"(",
"ctx",
"context",
".",
"Context",
",",
"u",
"*",
"chronograf",
".",
"User",
")",
"(",
"*",
"chronograf",
".",
"User",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"Ctrl",
".",
"CreateUs... | // Add creates a new User in Influx Enterprise | [
"Add",
"creates",
"a",
"new",
"User",
"in",
"Influx",
"Enterprise"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L17-L33 |
123,653 | influxdata/influxdb | chronograf/enterprise/users.go | Delete | func (c *UserStore) Delete(ctx context.Context, u *chronograf.User) error {
return c.Ctrl.DeleteUser(ctx, u.Name)
} | go | func (c *UserStore) Delete(ctx context.Context, u *chronograf.User) error {
return c.Ctrl.DeleteUser(ctx, u.Name)
} | [
"func",
"(",
"c",
"*",
"UserStore",
")",
"Delete",
"(",
"ctx",
"context",
".",
"Context",
",",
"u",
"*",
"chronograf",
".",
"User",
")",
"error",
"{",
"return",
"c",
".",
"Ctrl",
".",
"DeleteUser",
"(",
"ctx",
",",
"u",
".",
"Name",
")",
"\n",
"}... | // Delete the User from Influx Enterprise | [
"Delete",
"the",
"User",
"from",
"Influx",
"Enterprise"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L36-L38 |
123,654 | influxdata/influxdb | chronograf/enterprise/users.go | Num | func (c *UserStore) Num(ctx context.Context) (int, error) {
all, err := c.All(ctx)
if err != nil {
return 0, err
}
return len(all), nil
} | go | func (c *UserStore) Num(ctx context.Context) (int, error) {
all, err := c.All(ctx)
if err != nil {
return 0, err
}
return len(all), nil
} | [
"func",
"(",
"c",
"*",
"UserStore",
")",
"Num",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"int",
",",
"error",
")",
"{",
"all",
",",
"err",
":=",
"c",
".",
"All",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
","... | // Num of users in Influx | [
"Num",
"of",
"users",
"in",
"Influx"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L41-L48 |
123,655 | influxdata/influxdb | chronograf/enterprise/users.go | All | func (c *UserStore) All(ctx context.Context) ([]chronograf.User, error) {
all, err := c.Ctrl.Users(ctx, nil)
if err != nil {
return nil, err
}
ur, err := c.Ctrl.UserRoles(ctx)
if err != nil {
return nil, err
}
res := make([]chronograf.User, len(all.Users))
for i, user := range all.Users {
role := ur[use... | go | func (c *UserStore) All(ctx context.Context) ([]chronograf.User, error) {
all, err := c.Ctrl.Users(ctx, nil)
if err != nil {
return nil, err
}
ur, err := c.Ctrl.UserRoles(ctx)
if err != nil {
return nil, err
}
res := make([]chronograf.User, len(all.Users))
for i, user := range all.Users {
role := ur[use... | [
"func",
"(",
"c",
"*",
"UserStore",
")",
"All",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"[",
"]",
"chronograf",
".",
"User",
",",
"error",
")",
"{",
"all",
",",
"err",
":=",
"c",
".",
"Ctrl",
".",
"Users",
"(",
"ctx",
",",
"nil",
")",
... | // All is all users in influx | [
"All",
"is",
"all",
"users",
"in",
"influx"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L133-L161 |
123,656 | influxdata/influxdb | chronograf/enterprise/users.go | ToEnterprise | func ToEnterprise(perms chronograf.Permissions) Permissions {
res := Permissions{}
for _, perm := range perms {
if perm.Scope == chronograf.AllScope {
// Enterprise uses empty string as the key for all databases
res[""] = perm.Allowed
} else {
res[perm.Name] = perm.Allowed
}
}
return res
} | go | func ToEnterprise(perms chronograf.Permissions) Permissions {
res := Permissions{}
for _, perm := range perms {
if perm.Scope == chronograf.AllScope {
// Enterprise uses empty string as the key for all databases
res[""] = perm.Allowed
} else {
res[perm.Name] = perm.Allowed
}
}
return res
} | [
"func",
"ToEnterprise",
"(",
"perms",
"chronograf",
".",
"Permissions",
")",
"Permissions",
"{",
"res",
":=",
"Permissions",
"{",
"}",
"\n",
"for",
"_",
",",
"perm",
":=",
"range",
"perms",
"{",
"if",
"perm",
".",
"Scope",
"==",
"chronograf",
".",
"AllSc... | // ToEnterprise converts chronograf permission shape to enterprise | [
"ToEnterprise",
"converts",
"chronograf",
"permission",
"shape",
"to",
"enterprise"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L164-L175 |
123,657 | influxdata/influxdb | chronograf/enterprise/users.go | ToChronograf | func ToChronograf(perms Permissions) chronograf.Permissions {
res := chronograf.Permissions{}
for db, perm := range perms {
// Enterprise uses empty string as the key for all databases
if db == "" {
res = append(res, chronograf.Permission{
Scope: chronograf.AllScope,
Allowed: perm,
})
} else {
... | go | func ToChronograf(perms Permissions) chronograf.Permissions {
res := chronograf.Permissions{}
for db, perm := range perms {
// Enterprise uses empty string as the key for all databases
if db == "" {
res = append(res, chronograf.Permission{
Scope: chronograf.AllScope,
Allowed: perm,
})
} else {
... | [
"func",
"ToChronograf",
"(",
"perms",
"Permissions",
")",
"chronograf",
".",
"Permissions",
"{",
"res",
":=",
"chronograf",
".",
"Permissions",
"{",
"}",
"\n",
"for",
"db",
",",
"perm",
":=",
"range",
"perms",
"{",
"// Enterprise uses empty string as the key for a... | // ToChronograf converts enterprise permissions shape to chronograf shape | [
"ToChronograf",
"converts",
"enterprise",
"permissions",
"shape",
"to",
"chronograf",
"shape"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/enterprise/users.go#L178-L197 |
123,658 | influxdata/influxdb | telemetry/handler.go | NewPushGateway | func NewPushGateway(logger *zap.Logger, store Store, xforms ...prometheus.Transformer) *PushGateway {
if len(xforms) == 0 {
xforms = append(xforms, &AddTimestamps{})
}
return &PushGateway{
Store: store,
Transformers: xforms,
Logger: logger,
Timeout: DefaultTimeout,
MaxBytes: Default... | go | func NewPushGateway(logger *zap.Logger, store Store, xforms ...prometheus.Transformer) *PushGateway {
if len(xforms) == 0 {
xforms = append(xforms, &AddTimestamps{})
}
return &PushGateway{
Store: store,
Transformers: xforms,
Logger: logger,
Timeout: DefaultTimeout,
MaxBytes: Default... | [
"func",
"NewPushGateway",
"(",
"logger",
"*",
"zap",
".",
"Logger",
",",
"store",
"Store",
",",
"xforms",
"...",
"prometheus",
".",
"Transformer",
")",
"*",
"PushGateway",
"{",
"if",
"len",
"(",
"xforms",
")",
"==",
"0",
"{",
"xforms",
"=",
"append",
"... | // NewPushGateway constructs the PushGateway. | [
"NewPushGateway",
"constructs",
"the",
"PushGateway",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/telemetry/handler.go#L44-L55 |
123,659 | influxdata/influxdb | telemetry/handler.go | Handler | func (p *PushGateway) Handler(w http.ResponseWriter, r *http.Request) {
// redirect to agreement to give our users information about
// this collected data.
switch r.Method {
case http.MethodGet, http.MethodHead:
http.Redirect(w, r, "https://www.influxdata.com/telemetry", http.StatusSeeOther)
return
case http.... | go | func (p *PushGateway) Handler(w http.ResponseWriter, r *http.Request) {
// redirect to agreement to give our users information about
// this collected data.
switch r.Method {
case http.MethodGet, http.MethodHead:
http.Redirect(w, r, "https://www.influxdata.com/telemetry", http.StatusSeeOther)
return
case http.... | [
"func",
"(",
"p",
"*",
"PushGateway",
")",
"Handler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"// redirect to agreement to give our users information about",
"// this collected data.",
"switch",
"r",
".",
"Method",
... | // Handler accepts prometheus metrics send via the Push client and sends those
// metrics into the store. | [
"Handler",
"accepts",
"prometheus",
"metrics",
"send",
"via",
"the",
"Push",
"client",
"and",
"sends",
"those",
"metrics",
"into",
"the",
"store",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/telemetry/handler.go#L59-L137 |
123,660 | influxdata/influxdb | telemetry/handler.go | valid | func valid(mfs []*dto.MetricFamily) error {
// Checks if any timestamps have been specified.
for i := range mfs {
for j := range mfs[i].Metric {
if mfs[i].Metric[j].TimestampMs != nil {
return ErrMetricsTimestampPresent
}
}
}
return nil
} | go | func valid(mfs []*dto.MetricFamily) error {
// Checks if any timestamps have been specified.
for i := range mfs {
for j := range mfs[i].Metric {
if mfs[i].Metric[j].TimestampMs != nil {
return ErrMetricsTimestampPresent
}
}
}
return nil
} | [
"func",
"valid",
"(",
"mfs",
"[",
"]",
"*",
"dto",
".",
"MetricFamily",
")",
"error",
"{",
"// Checks if any timestamps have been specified.",
"for",
"i",
":=",
"range",
"mfs",
"{",
"for",
"j",
":=",
"range",
"mfs",
"[",
"i",
"]",
".",
"Metric",
"{",
"if... | // prom's pushgateway does not allow timestamps for some reason. | [
"prom",
"s",
"pushgateway",
"does",
"not",
"allow",
"timestamps",
"for",
"some",
"reason",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/telemetry/handler.go#L159-L169 |
123,661 | influxdata/influxdb | pkg/metrics/group.go | ForEach | func (g *Group) ForEach(fn func(v Metric)) {
for i := range g.counters {
fn(&g.counters[i])
}
for i := range g.timers {
fn(&g.timers[i])
}
} | go | func (g *Group) ForEach(fn func(v Metric)) {
for i := range g.counters {
fn(&g.counters[i])
}
for i := range g.timers {
fn(&g.timers[i])
}
} | [
"func",
"(",
"g",
"*",
"Group",
")",
"ForEach",
"(",
"fn",
"func",
"(",
"v",
"Metric",
")",
")",
"{",
"for",
"i",
":=",
"range",
"g",
".",
"counters",
"{",
"fn",
"(",
"&",
"g",
".",
"counters",
"[",
"i",
"]",
")",
"\n",
"}",
"\n",
"for",
"i... | // ForEach calls fn for all measurements of the group. | [
"ForEach",
"calls",
"fn",
"for",
"all",
"measurements",
"of",
"the",
"group",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/pkg/metrics/group.go#L30-L37 |
123,662 | influxdata/influxdb | http/tokens.go | GetToken | func GetToken(r *http.Request) (string, error) {
header := r.Header.Get("Authorization")
if header == "" {
return "", ErrAuthHeaderMissing
}
if !strings.HasPrefix(header, tokenScheme) {
return "", ErrAuthBadScheme
}
return header[len(tokenScheme):], nil
} | go | func GetToken(r *http.Request) (string, error) {
header := r.Header.Get("Authorization")
if header == "" {
return "", ErrAuthHeaderMissing
}
if !strings.HasPrefix(header, tokenScheme) {
return "", ErrAuthBadScheme
}
return header[len(tokenScheme):], nil
} | [
"func",
"GetToken",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"(",
"string",
",",
"error",
")",
"{",
"header",
":=",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"header",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",... | // GetToken will parse the token from http Authorization Header. | [
"GetToken",
"will",
"parse",
"the",
"token",
"from",
"http",
"Authorization",
"Header",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/http/tokens.go#L19-L28 |
123,663 | influxdata/influxdb | http/tokens.go | SetToken | func SetToken(token string, req *http.Request) {
req.Header.Set("Authorization", fmt.Sprintf("%s%s", tokenScheme, token))
} | go | func SetToken(token string, req *http.Request) {
req.Header.Set("Authorization", fmt.Sprintf("%s%s", tokenScheme, token))
} | [
"func",
"SetToken",
"(",
"token",
"string",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"req",
".",
"Header",
".",
"Set",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"tokenScheme",
",",
"token",
")",
")",
"\n",
"}"
] | // SetToken adds the token to the request. | [
"SetToken",
"adds",
"the",
"token",
"to",
"the",
"request",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/http/tokens.go#L31-L33 |
123,664 | influxdata/influxdb | mock/onboarding_service.go | NewOnboardingService | func NewOnboardingService() *OnboardingService {
return &OnboardingService{
IsOnboardingFn: func(context.Context) (bool, error) { return false, nil },
GenerateFn: func(context.Context, *platform.OnboardingRequest) (*platform.OnboardingResults, error) {
return nil, nil
},
}
} | go | func NewOnboardingService() *OnboardingService {
return &OnboardingService{
IsOnboardingFn: func(context.Context) (bool, error) { return false, nil },
GenerateFn: func(context.Context, *platform.OnboardingRequest) (*platform.OnboardingResults, error) {
return nil, nil
},
}
} | [
"func",
"NewOnboardingService",
"(",
")",
"*",
"OnboardingService",
"{",
"return",
"&",
"OnboardingService",
"{",
"IsOnboardingFn",
":",
"func",
"(",
"context",
".",
"Context",
")",
"(",
"bool",
",",
"error",
")",
"{",
"return",
"false",
",",
"nil",
"}",
"... | // NewOnboardingService returns a mock of OnboardingService where its methods will return zero values. | [
"NewOnboardingService",
"returns",
"a",
"mock",
"of",
"OnboardingService",
"where",
"its",
"methods",
"will",
"return",
"zero",
"values",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/mock/onboarding_service.go#L24-L31 |
123,665 | influxdata/influxdb | mock/auth_service.go | FindAuthorizationByID | func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform.ID) (*platform.Authorization, error) {
return s.FindAuthorizationByIDFn(ctx, id)
} | go | func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform.ID) (*platform.Authorization, error) {
return s.FindAuthorizationByIDFn(ctx, id)
} | [
"func",
"(",
"s",
"*",
"AuthorizationService",
")",
"FindAuthorizationByID",
"(",
"ctx",
"context",
".",
"Context",
",",
"id",
"platform",
".",
"ID",
")",
"(",
"*",
"platform",
".",
"Authorization",
",",
"error",
")",
"{",
"return",
"s",
".",
"FindAuthoriz... | // FindAuthorizationByID returns a single authorization by ID. | [
"FindAuthorizationByID",
"returns",
"a",
"single",
"authorization",
"by",
"ID",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/mock/auth_service.go#L45-L47 |
123,666 | influxdata/influxdb | mock/auth_service.go | FindAuthorizations | func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, opts ...platform.FindOptions) ([]*platform.Authorization, int, error) {
return s.FindAuthorizationsFn(ctx, filter, opts...)
} | go | func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, opts ...platform.FindOptions) ([]*platform.Authorization, int, error) {
return s.FindAuthorizationsFn(ctx, filter, opts...)
} | [
"func",
"(",
"s",
"*",
"AuthorizationService",
")",
"FindAuthorizations",
"(",
"ctx",
"context",
".",
"Context",
",",
"filter",
"platform",
".",
"AuthorizationFilter",
",",
"opts",
"...",
"platform",
".",
"FindOptions",
")",
"(",
"[",
"]",
"*",
"platform",
"... | // FindAuthorizations returns a list of authorizations that match filter and the total count of matching authorizations. | [
"FindAuthorizations",
"returns",
"a",
"list",
"of",
"authorizations",
"that",
"match",
"filter",
"and",
"the",
"total",
"count",
"of",
"matching",
"authorizations",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/mock/auth_service.go#L54-L56 |
123,667 | influxdata/influxdb | mock/auth_service.go | DeleteAuthorization | func (s *AuthorizationService) DeleteAuthorization(ctx context.Context, id platform.ID) error {
return s.DeleteAuthorizationFn(ctx, id)
} | go | func (s *AuthorizationService) DeleteAuthorization(ctx context.Context, id platform.ID) error {
return s.DeleteAuthorizationFn(ctx, id)
} | [
"func",
"(",
"s",
"*",
"AuthorizationService",
")",
"DeleteAuthorization",
"(",
"ctx",
"context",
".",
"Context",
",",
"id",
"platform",
".",
"ID",
")",
"error",
"{",
"return",
"s",
".",
"DeleteAuthorizationFn",
"(",
"ctx",
",",
"id",
")",
"\n",
"}"
] | // DeleteAuthorization removes a authorization by ID. | [
"DeleteAuthorization",
"removes",
"a",
"authorization",
"by",
"ID",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/mock/auth_service.go#L64-L66 |
123,668 | influxdata/influxdb | dashboard.go | QueryParams | func (f DashboardFilter) QueryParams() map[string][]string {
qp := url.Values{}
for _, id := range f.IDs {
if id != nil {
qp.Add("id", id.String())
}
}
if f.OrganizationID != nil {
qp.Add("orgID", f.OrganizationID.String())
}
if f.Organization != nil {
qp.Add("org", *f.Organization)
}
return qp
} | go | func (f DashboardFilter) QueryParams() map[string][]string {
qp := url.Values{}
for _, id := range f.IDs {
if id != nil {
qp.Add("id", id.String())
}
}
if f.OrganizationID != nil {
qp.Add("orgID", f.OrganizationID.String())
}
if f.Organization != nil {
qp.Add("org", *f.Organization)
}
return qp
} | [
"func",
"(",
"f",
"DashboardFilter",
")",
"QueryParams",
"(",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"{",
"qp",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"for",
"_",
",",
"id",
":=",
"range",
"f",
".",
"IDs",
"{",
"if",
"id",
"!=... | // QueryParams turns a dashboard filter into query params
//
// It implements PagingFilter. | [
"QueryParams",
"turns",
"a",
"dashboard",
"filter",
"into",
"query",
"params",
"It",
"implements",
"PagingFilter",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L142-L159 |
123,669 | influxdata/influxdb | dashboard.go | Apply | func (u DashboardUpdate) Apply(d *Dashboard) error {
if u.Name != nil {
d.Name = *u.Name
}
if u.Description != nil {
d.Description = *u.Description
}
return nil
} | go | func (u DashboardUpdate) Apply(d *Dashboard) error {
if u.Name != nil {
d.Name = *u.Name
}
if u.Description != nil {
d.Description = *u.Description
}
return nil
} | [
"func",
"(",
"u",
"DashboardUpdate",
")",
"Apply",
"(",
"d",
"*",
"Dashboard",
")",
"error",
"{",
"if",
"u",
".",
"Name",
"!=",
"nil",
"{",
"d",
".",
"Name",
"=",
"*",
"u",
".",
"Name",
"\n",
"}",
"\n\n",
"if",
"u",
".",
"Description",
"!=",
"n... | // Apply applies an update to a dashboard. | [
"Apply",
"applies",
"an",
"update",
"to",
"a",
"dashboard",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L168-L178 |
123,670 | influxdata/influxdb | dashboard.go | Valid | func (u DashboardUpdate) Valid() *Error {
if u.Name == nil && u.Description == nil {
return &Error{
Code: EInvalid,
Msg: "must update at least one attribute",
}
}
return nil
} | go | func (u DashboardUpdate) Valid() *Error {
if u.Name == nil && u.Description == nil {
return &Error{
Code: EInvalid,
Msg: "must update at least one attribute",
}
}
return nil
} | [
"func",
"(",
"u",
"DashboardUpdate",
")",
"Valid",
"(",
")",
"*",
"Error",
"{",
"if",
"u",
".",
"Name",
"==",
"nil",
"&&",
"u",
".",
"Description",
"==",
"nil",
"{",
"return",
"&",
"Error",
"{",
"Code",
":",
"EInvalid",
",",
"Msg",
":",
"\"",
"\"... | // Valid returns an error if the dashboard update is invalid. | [
"Valid",
"returns",
"an",
"error",
"if",
"the",
"dashboard",
"update",
"is",
"invalid",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L181-L190 |
123,671 | influxdata/influxdb | dashboard.go | Apply | func (u CellUpdate) Apply(c *Cell) error {
if u.X != nil {
c.X = *u.X
}
if u.Y != nil {
c.Y = *u.Y
}
if u.W != nil {
c.W = *u.W
}
if u.H != nil {
c.H = *u.H
}
return nil
} | go | func (u CellUpdate) Apply(c *Cell) error {
if u.X != nil {
c.X = *u.X
}
if u.Y != nil {
c.Y = *u.Y
}
if u.W != nil {
c.W = *u.W
}
if u.H != nil {
c.H = *u.H
}
return nil
} | [
"func",
"(",
"u",
"CellUpdate",
")",
"Apply",
"(",
"c",
"*",
"Cell",
")",
"error",
"{",
"if",
"u",
".",
"X",
"!=",
"nil",
"{",
"c",
".",
"X",
"=",
"*",
"u",
".",
"X",
"\n",
"}",
"\n\n",
"if",
"u",
".",
"Y",
"!=",
"nil",
"{",
"c",
".",
"... | // Apply applies an update to a Cell. | [
"Apply",
"applies",
"an",
"update",
"to",
"a",
"Cell",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L206-L224 |
123,672 | influxdata/influxdb | dashboard.go | Valid | func (u CellUpdate) Valid() *Error {
if u.H == nil && u.W == nil && u.Y == nil && u.X == nil {
return &Error{
Code: EInvalid,
Msg: "must update at least one attribute",
}
}
return nil
} | go | func (u CellUpdate) Valid() *Error {
if u.H == nil && u.W == nil && u.Y == nil && u.X == nil {
return &Error{
Code: EInvalid,
Msg: "must update at least one attribute",
}
}
return nil
} | [
"func",
"(",
"u",
"CellUpdate",
")",
"Valid",
"(",
")",
"*",
"Error",
"{",
"if",
"u",
".",
"H",
"==",
"nil",
"&&",
"u",
".",
"W",
"==",
"nil",
"&&",
"u",
".",
"Y",
"==",
"nil",
"&&",
"u",
".",
"X",
"==",
"nil",
"{",
"return",
"&",
"Error",
... | // Valid returns an error if the cell update is invalid. | [
"Valid",
"returns",
"an",
"error",
"if",
"the",
"cell",
"update",
"is",
"invalid",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L227-L236 |
123,673 | influxdata/influxdb | dashboard.go | Valid | func (u ViewUpdate) Valid() *Error {
_, ok := u.Properties.(EmptyViewProperties)
if u.Name == nil && ok {
return &Error{
Code: EInvalid,
Msg: "expected at least one attribute to be updated",
}
}
return nil
} | go | func (u ViewUpdate) Valid() *Error {
_, ok := u.Properties.(EmptyViewProperties)
if u.Name == nil && ok {
return &Error{
Code: EInvalid,
Msg: "expected at least one attribute to be updated",
}
}
return nil
} | [
"func",
"(",
"u",
"ViewUpdate",
")",
"Valid",
"(",
")",
"*",
"Error",
"{",
"_",
",",
"ok",
":=",
"u",
".",
"Properties",
".",
"(",
"EmptyViewProperties",
")",
"\n",
"if",
"u",
".",
"Name",
"==",
"nil",
"&&",
"ok",
"{",
"return",
"&",
"Error",
"{"... | // Valid validates the update struct. It expects minimal values to be set. | [
"Valid",
"validates",
"the",
"update",
"struct",
".",
"It",
"expects",
"minimal",
"values",
"to",
"be",
"set",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L245-L255 |
123,674 | influxdata/influxdb | dashboard.go | Apply | func (u ViewUpdate) Apply(v *View) error {
if err := u.Valid(); err != nil {
return err
}
if u.Name != nil {
v.Name = *u.Name
}
if u.Properties != nil {
v.Properties = u.Properties
}
return nil
} | go | func (u ViewUpdate) Apply(v *View) error {
if err := u.Valid(); err != nil {
return err
}
if u.Name != nil {
v.Name = *u.Name
}
if u.Properties != nil {
v.Properties = u.Properties
}
return nil
} | [
"func",
"(",
"u",
"ViewUpdate",
")",
"Apply",
"(",
"v",
"*",
"View",
")",
"error",
"{",
"if",
"err",
":=",
"u",
".",
"Valid",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"if",
"u",
".",
"Name",
"!=",
"nil",
"{"... | // Apply updates a view with the view updates properties. | [
"Apply",
"updates",
"a",
"view",
"with",
"the",
"view",
"updates",
"properties",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dashboard.go#L258-L272 |
123,675 | influxdata/influxdb | tsdb/tsm1/value.go | CollectionToValues | func CollectionToValues(collection *tsdb.SeriesCollection) (map[string][]Value, error) {
values := make(map[string][]Value, collection.Length())
var (
keyBuf []byte
baseLen int
)
j := 0
for citer := collection.Iterator(); citer.Next(); {
keyBuf = append(keyBuf[:0], citer.Key()...)
keyBuf = append(keyBuf,... | go | func CollectionToValues(collection *tsdb.SeriesCollection) (map[string][]Value, error) {
values := make(map[string][]Value, collection.Length())
var (
keyBuf []byte
baseLen int
)
j := 0
for citer := collection.Iterator(); citer.Next(); {
keyBuf = append(keyBuf[:0], citer.Key()...)
keyBuf = append(keyBuf,... | [
"func",
"CollectionToValues",
"(",
"collection",
"*",
"tsdb",
".",
"SeriesCollection",
")",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"Value",
",",
"error",
")",
"{",
"values",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"Value",
",",
"co... | // CollectionToValues takes in a series collection and returns it as a map of series key to
// values. It returns an error if any of the points could not be converted. | [
"CollectionToValues",
"takes",
"in",
"a",
"series",
"collection",
"and",
"returns",
"it",
"as",
"a",
"map",
"of",
"series",
"key",
"to",
"values",
".",
"It",
"returns",
"an",
"error",
"if",
"any",
"of",
"the",
"points",
"could",
"not",
"be",
"converted",
... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsm1/value.go#L56-L129 |
123,676 | influxdata/influxdb | tsdb/tsm1/value.go | ValuesToPoints | func ValuesToPoints(values map[string][]Value) []models.Point {
points := make([]models.Point, 0, len(values))
for composite, vals := range values {
series, field := SeriesAndFieldFromCompositeKey([]byte(composite))
strField := string(field)
for _, val := range vals {
t := time.Unix(0, val.UnixNano())
fie... | go | func ValuesToPoints(values map[string][]Value) []models.Point {
points := make([]models.Point, 0, len(values))
for composite, vals := range values {
series, field := SeriesAndFieldFromCompositeKey([]byte(composite))
strField := string(field)
for _, val := range vals {
t := time.Unix(0, val.UnixNano())
fie... | [
"func",
"ValuesToPoints",
"(",
"values",
"map",
"[",
"string",
"]",
"[",
"]",
"Value",
")",
"[",
"]",
"models",
".",
"Point",
"{",
"points",
":=",
"make",
"(",
"[",
"]",
"models",
".",
"Point",
",",
"0",
",",
"len",
"(",
"values",
")",
")",
"\n",... | // ValuesToPoints takes in a map of values and returns a slice of models.Point. | [
"ValuesToPoints",
"takes",
"in",
"a",
"map",
"of",
"values",
"and",
"returns",
"a",
"slice",
"of",
"models",
".",
"Point",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/tsdb/tsm1/value.go#L132-L144 |
123,677 | influxdata/influxdb | dbrp_mapping.go | Equal | func (m *DBRPMapping) Equal(o *DBRPMapping) bool {
if m == o {
return true
}
if m == nil || o == nil {
return false
}
return m.Cluster == o.Cluster &&
m.Database == o.Database &&
m.RetentionPolicy == o.RetentionPolicy &&
m.Default == o.Default &&
m.OrganizationID.Valid() &&
o.OrganizationID.Valid() &... | go | func (m *DBRPMapping) Equal(o *DBRPMapping) bool {
if m == o {
return true
}
if m == nil || o == nil {
return false
}
return m.Cluster == o.Cluster &&
m.Database == o.Database &&
m.RetentionPolicy == o.RetentionPolicy &&
m.Default == o.Default &&
m.OrganizationID.Valid() &&
o.OrganizationID.Valid() &... | [
"func",
"(",
"m",
"*",
"DBRPMapping",
")",
"Equal",
"(",
"o",
"*",
"DBRPMapping",
")",
"bool",
"{",
"if",
"m",
"==",
"o",
"{",
"return",
"true",
"\n",
"}",
"\n",
"if",
"m",
"==",
"nil",
"||",
"o",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",... | // Equal checks if the two mappings are identical. | [
"Equal",
"checks",
"if",
"the",
"two",
"mappings",
"are",
"identical",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/dbrp_mapping.go#L73-L90 |
123,678 | influxdata/influxdb | chronograf/bolt/sources.go | Migrate | func (s *SourcesStore) Migrate(ctx context.Context) error {
sources, err := s.All(ctx)
if err != nil {
return err
}
if len(sources) == 0 {
if err := s.Put(ctx, DefaultSource); err != nil {
return err
}
}
defaultOrg, err := s.client.OrganizationsStore.DefaultOrganization(ctx)
if err != nil {
return er... | go | func (s *SourcesStore) Migrate(ctx context.Context) error {
sources, err := s.All(ctx)
if err != nil {
return err
}
if len(sources) == 0 {
if err := s.Put(ctx, DefaultSource); err != nil {
return err
}
}
defaultOrg, err := s.client.OrganizationsStore.DefaultOrganization(ctx)
if err != nil {
return er... | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Migrate",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"sources",
",",
"err",
":=",
"s",
".",
"All",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",... | // Migrate adds the default source to an existing boltdb. | [
"Migrate",
"adds",
"the",
"default",
"source",
"to",
"an",
"existing",
"boltdb",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L34-L63 |
123,679 | influxdata/influxdb | chronograf/bolt/sources.go | Add | func (s *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error) {
// force first source added to be default
if srcs, err := s.All(ctx); err != nil {
return chronograf.Source{}, err
} else if len(srcs) == 0 {
src.Default = true
}
if err := s.client.db.Update(func(tx *bolt.Tx)... | go | func (s *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error) {
// force first source added to be default
if srcs, err := s.All(ctx); err != nil {
return chronograf.Source{}, err
} else if len(srcs) == 0 {
src.Default = true
}
if err := s.client.db.Update(func(tx *bolt.Tx)... | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Add",
"(",
"ctx",
"context",
".",
"Context",
",",
"src",
"chronograf",
".",
"Source",
")",
"(",
"chronograf",
".",
"Source",
",",
"error",
")",
"{",
"// force first source added to be default",
"if",
"srcs",
",",
... | // Add creates a new Source in the SourceStore. | [
"Add",
"creates",
"a",
"new",
"Source",
"in",
"the",
"SourceStore",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L84-L100 |
123,680 | influxdata/influxdb | chronograf/bolt/sources.go | Delete | func (s *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error {
if err := s.client.db.Update(func(tx *bolt.Tx) error {
if err := s.setRandomDefault(ctx, src, tx); err != nil {
return err
}
return s.delete(ctx, src, tx)
}); err != nil {
return err
}
return nil
} | go | func (s *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error {
if err := s.client.db.Update(func(tx *bolt.Tx) error {
if err := s.setRandomDefault(ctx, src, tx); err != nil {
return err
}
return s.delete(ctx, src, tx)
}); err != nil {
return err
}
return nil
} | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Delete",
"(",
"ctx",
"context",
".",
"Context",
",",
"src",
"chronograf",
".",
"Source",
")",
"error",
"{",
"if",
"err",
":=",
"s",
".",
"client",
".",
"db",
".",
"Update",
"(",
"func",
"(",
"tx",
"*",
... | // Delete removes the Source from the SourcesStore | [
"Delete",
"removes",
"the",
"Source",
"from",
"the",
"SourcesStore"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L103-L114 |
123,681 | influxdata/influxdb | chronograf/bolt/sources.go | Get | func (s *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error) {
var src chronograf.Source
if err := s.client.db.View(func(tx *bolt.Tx) error {
var err error
src, err = s.get(ctx, id, tx)
if err != nil {
return err
}
return nil
}); err != nil {
return chronograf.Source{}, err
}
... | go | func (s *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error) {
var src chronograf.Source
if err := s.client.db.View(func(tx *bolt.Tx) error {
var err error
src, err = s.get(ctx, id, tx)
if err != nil {
return err
}
return nil
}); err != nil {
return chronograf.Source{}, err
}
... | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Get",
"(",
"ctx",
"context",
".",
"Context",
",",
"id",
"int",
")",
"(",
"chronograf",
".",
"Source",
",",
"error",
")",
"{",
"var",
"src",
"chronograf",
".",
"Source",
"\n",
"if",
"err",
":=",
"s",
".",... | // Get returns a Source if the id exists. | [
"Get",
"returns",
"a",
"Source",
"if",
"the",
"id",
"exists",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L117-L131 |
123,682 | influxdata/influxdb | chronograf/bolt/sources.go | Update | func (s *SourcesStore) Update(ctx context.Context, src chronograf.Source) error {
if err := s.client.db.Update(func(tx *bolt.Tx) error {
return s.update(ctx, src, tx)
}); err != nil {
return err
}
return nil
} | go | func (s *SourcesStore) Update(ctx context.Context, src chronograf.Source) error {
if err := s.client.db.Update(func(tx *bolt.Tx) error {
return s.update(ctx, src, tx)
}); err != nil {
return err
}
return nil
} | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Update",
"(",
"ctx",
"context",
".",
"Context",
",",
"src",
"chronograf",
".",
"Source",
")",
"error",
"{",
"if",
"err",
":=",
"s",
".",
"client",
".",
"db",
".",
"Update",
"(",
"func",
"(",
"tx",
"*",
... | // Update a Source | [
"Update",
"a",
"Source"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L134-L142 |
123,683 | influxdata/influxdb | chronograf/bolt/sources.go | Put | func (s *SourcesStore) Put(ctx context.Context, src *chronograf.Source) error {
return s.client.db.Update(func(tx *bolt.Tx) error {
return s.put(ctx, src, tx)
})
} | go | func (s *SourcesStore) Put(ctx context.Context, src *chronograf.Source) error {
return s.client.db.Update(func(tx *bolt.Tx) error {
return s.put(ctx, src, tx)
})
} | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"Put",
"(",
"ctx",
"context",
".",
"Context",
",",
"src",
"*",
"chronograf",
".",
"Source",
")",
"error",
"{",
"return",
"s",
".",
"client",
".",
"db",
".",
"Update",
"(",
"func",
"(",
"tx",
"*",
"bolt",
... | // Put updates the source. | [
"Put",
"updates",
"the",
"source",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L160-L164 |
123,684 | influxdata/influxdb | chronograf/bolt/sources.go | resetDefaultSource | func (s *SourcesStore) resetDefaultSource(ctx context.Context, tx *bolt.Tx) error {
b := tx.Bucket(SourcesBucket)
srcs, err := s.all(ctx, tx)
if err != nil {
return err
}
for _, other := range srcs {
if other.Default {
other.Default = false
if v, err := internal.MarshalSource(other); err != nil {
re... | go | func (s *SourcesStore) resetDefaultSource(ctx context.Context, tx *bolt.Tx) error {
b := tx.Bucket(SourcesBucket)
srcs, err := s.all(ctx, tx)
if err != nil {
return err
}
for _, other := range srcs {
if other.Default {
other.Default = false
if v, err := internal.MarshalSource(other); err != nil {
re... | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"resetDefaultSource",
"(",
"ctx",
"context",
".",
"Context",
",",
"tx",
"*",
"bolt",
".",
"Tx",
")",
"error",
"{",
"b",
":=",
"tx",
".",
"Bucket",
"(",
"SourcesBucket",
")",
"\n",
"srcs",
",",
"err",
":=",
... | // resetDefaultSource unsets the Default flag on all sources | [
"resetDefaultSource",
"unsets",
"the",
"Default",
"flag",
"on",
"all",
"sources"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L238-L256 |
123,685 | influxdata/influxdb | chronograf/bolt/sources.go | setRandomDefault | func (s *SourcesStore) setRandomDefault(ctx context.Context, src chronograf.Source, tx *bolt.Tx) error {
// Check if requested source is the current default
if target, err := s.get(ctx, src.ID, tx); err != nil {
return err
} else if target.Default {
// Locate another source to be the new default
srcs, err := s... | go | func (s *SourcesStore) setRandomDefault(ctx context.Context, src chronograf.Source, tx *bolt.Tx) error {
// Check if requested source is the current default
if target, err := s.get(ctx, src.ID, tx); err != nil {
return err
} else if target.Default {
// Locate another source to be the new default
srcs, err := s... | [
"func",
"(",
"s",
"*",
"SourcesStore",
")",
"setRandomDefault",
"(",
"ctx",
"context",
".",
"Context",
",",
"src",
"chronograf",
".",
"Source",
",",
"tx",
"*",
"bolt",
".",
"Tx",
")",
"error",
"{",
"// Check if requested source is the current default",
"if",
"... | // setRandomDefault will locate a source other than the provided
// chronograf.Source and set it as the default source. If no other sources are
// available, the provided source will be set to the default source if is not
// already. It assumes that the provided chronograf.Source has been persisted. | [
"setRandomDefault",
"will",
"locate",
"a",
"source",
"other",
"than",
"the",
"provided",
"chronograf",
".",
"Source",
"and",
"set",
"it",
"as",
"the",
"default",
"source",
".",
"If",
"no",
"other",
"sources",
"are",
"available",
"the",
"provided",
"source",
... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/bolt/sources.go#L262-L288 |
123,686 | influxdata/influxdb | task/backend/analytical_storage.go | NewAnalyticalStorage | func NewAnalyticalStorage(ts influxdb.TaskService, tcs TaskControlService, pw storage.PointsWriter, qs query.QueryService) *AnalyticalStorage {
return &AnalyticalStorage{
TaskService: ts,
TaskControlService: tcs,
pw: pw,
qs: qs,
}
} | go | func NewAnalyticalStorage(ts influxdb.TaskService, tcs TaskControlService, pw storage.PointsWriter, qs query.QueryService) *AnalyticalStorage {
return &AnalyticalStorage{
TaskService: ts,
TaskControlService: tcs,
pw: pw,
qs: qs,
}
} | [
"func",
"NewAnalyticalStorage",
"(",
"ts",
"influxdb",
".",
"TaskService",
",",
"tcs",
"TaskControlService",
",",
"pw",
"storage",
".",
"PointsWriter",
",",
"qs",
"query",
".",
"QueryService",
")",
"*",
"AnalyticalStorage",
"{",
"return",
"&",
"AnalyticalStorage",... | // NewAnalyticalStorage creates a new analytical store with access to the necessary systems for storing data and to act as a middleware | [
"NewAnalyticalStorage",
"creates",
"a",
"new",
"analytical",
"store",
"with",
"access",
"to",
"the",
"necessary",
"systems",
"for",
"storing",
"data",
"and",
"to",
"act",
"as",
"a",
"middleware"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/task/backend/analytical_storage.go#L20-L27 |
123,687 | influxdata/influxdb | task/backend/analytical_storage.go | FindLogs | func (as *AnalyticalStorage) FindLogs(ctx context.Context, filter influxdb.LogFilter) ([]*influxdb.Log, int, error) {
var logs []*influxdb.Log
if filter.Run != nil {
run, err := as.FindRunByID(ctx, filter.Task, *filter.Run)
if err != nil {
return nil, 0, err
}
for i := 0; i < len(run.Log); i++ {
logs = ... | go | func (as *AnalyticalStorage) FindLogs(ctx context.Context, filter influxdb.LogFilter) ([]*influxdb.Log, int, error) {
var logs []*influxdb.Log
if filter.Run != nil {
run, err := as.FindRunByID(ctx, filter.Task, *filter.Run)
if err != nil {
return nil, 0, err
}
for i := 0; i < len(run.Log); i++ {
logs = ... | [
"func",
"(",
"as",
"*",
"AnalyticalStorage",
")",
"FindLogs",
"(",
"ctx",
"context",
".",
"Context",
",",
"filter",
"influxdb",
".",
"LogFilter",
")",
"(",
"[",
"]",
"*",
"influxdb",
".",
"Log",
",",
"int",
",",
"error",
")",
"{",
"var",
"logs",
"[",... | // FindLogs returns logs for a run.
// First attempt to use the TaskService, then append additional analytical's logs to the list | [
"FindLogs",
"returns",
"logs",
"for",
"a",
"run",
".",
"First",
"attempt",
"to",
"use",
"the",
"TaskService",
"then",
"append",
"additional",
"analytical",
"s",
"logs",
"to",
"the",
"list"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/task/backend/analytical_storage.go#L89-L115 |
123,688 | influxdata/influxdb | task/backend/analytical_storage.go | FindRuns | func (as *AnalyticalStorage) FindRuns(ctx context.Context, filter influxdb.RunFilter) ([]*influxdb.Run, int, error) {
if filter.Limit == 0 || filter.Limit > influxdb.TaskMaxPageSize {
filter.Limit = influxdb.TaskMaxPageSize
}
runs, n, err := as.TaskService.FindRuns(ctx, filter)
if err != nil {
return runs, n, ... | go | func (as *AnalyticalStorage) FindRuns(ctx context.Context, filter influxdb.RunFilter) ([]*influxdb.Run, int, error) {
if filter.Limit == 0 || filter.Limit > influxdb.TaskMaxPageSize {
filter.Limit = influxdb.TaskMaxPageSize
}
runs, n, err := as.TaskService.FindRuns(ctx, filter)
if err != nil {
return runs, n, ... | [
"func",
"(",
"as",
"*",
"AnalyticalStorage",
")",
"FindRuns",
"(",
"ctx",
"context",
".",
"Context",
",",
"filter",
"influxdb",
".",
"RunFilter",
")",
"(",
"[",
"]",
"*",
"influxdb",
".",
"Run",
",",
"int",
",",
"error",
")",
"{",
"if",
"filter",
"."... | // FindRuns returns a list of runs that match a filter and the total count of returned runs.
// First attempt to use the TaskService, then append additional analytical's runs to the list | [
"FindRuns",
"returns",
"a",
"list",
"of",
"runs",
"that",
"match",
"a",
"filter",
"and",
"the",
"total",
"count",
"of",
"returned",
"runs",
".",
"First",
"attempt",
"to",
"use",
"the",
"TaskService",
"then",
"append",
"additional",
"analytical",
"s",
"runs",... | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/task/backend/analytical_storage.go#L119-L180 |
123,689 | influxdata/influxdb | task/backend/analytical_storage.go | FindRunByID | func (as *AnalyticalStorage) FindRunByID(ctx context.Context, taskID, runID influxdb.ID) (*influxdb.Run, error) {
// check the taskService to see if the run is on its list
run, err := as.TaskService.FindRunByID(ctx, taskID, runID)
if err != nil {
if err, ok := err.(*influxdb.Error); !ok || err.Msg != "run not foun... | go | func (as *AnalyticalStorage) FindRunByID(ctx context.Context, taskID, runID influxdb.ID) (*influxdb.Run, error) {
// check the taskService to see if the run is on its list
run, err := as.TaskService.FindRunByID(ctx, taskID, runID)
if err != nil {
if err, ok := err.(*influxdb.Error); !ok || err.Msg != "run not foun... | [
"func",
"(",
"as",
"*",
"AnalyticalStorage",
")",
"FindRunByID",
"(",
"ctx",
"context",
".",
"Context",
",",
"taskID",
",",
"runID",
"influxdb",
".",
"ID",
")",
"(",
"*",
"influxdb",
".",
"Run",
",",
"error",
")",
"{",
"// check the taskService to see if the... | // FindRunByID returns a single run.
// First see if it is in the existing TaskService. If not pull it from analytical storage. | [
"FindRunByID",
"returns",
"a",
"single",
"run",
".",
"First",
"see",
"if",
"it",
"is",
"in",
"the",
"existing",
"TaskService",
".",
"If",
"not",
"pull",
"it",
"from",
"analytical",
"storage",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/task/backend/analytical_storage.go#L184-L246 |
123,690 | influxdata/influxdb | gather/scheduler.go | Run | func (s *Scheduler) Run(ctx context.Context) error {
go func(s *Scheduler, ctx context.Context) {
for {
select {
case <-ctx.Done():
return
case <-time.After(s.Interval): // TODO: change to ticker because of garbage collection
s.gather <- struct{}{}
}
}
}(s, ctx)
return s.run(ctx)
} | go | func (s *Scheduler) Run(ctx context.Context) error {
go func(s *Scheduler, ctx context.Context) {
for {
select {
case <-ctx.Done():
return
case <-time.After(s.Interval): // TODO: change to ticker because of garbage collection
s.gather <- struct{}{}
}
}
}(s, ctx)
return s.run(ctx)
} | [
"func",
"(",
"s",
"*",
"Scheduler",
")",
"Run",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"go",
"func",
"(",
"s",
"*",
"Scheduler",
",",
"ctx",
"context",
".",
"Context",
")",
"{",
"for",
"{",
"select",
"{",
"case",
"<-",
"ctx",
"... | // Run will retrieve scraper targets from the target storage,
// and publish them to nats job queue for gather. | [
"Run",
"will",
"retrieve",
"scraper",
"targets",
"from",
"the",
"target",
"storage",
"and",
"publish",
"them",
"to",
"nats",
"job",
"queue",
"for",
"gather",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/gather/scheduler.go#L79-L91 |
123,691 | influxdata/influxdb | chronograf/server/config.go | Config | func (s *Service) Config(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
config, err := s.Store.Config(ctx).Get(ctx)
if err != nil {
Error(w, http.StatusBadRequest, err.Error(), s.Logger)
return
}
if config == nil {
Error(w, http.StatusBadRequest, "Configuration object was nil", s.Logger)
re... | go | func (s *Service) Config(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
config, err := s.Store.Config(ctx).Get(ctx)
if err != nil {
Error(w, http.StatusBadRequest, err.Error(), s.Logger)
return
}
if config == nil {
Error(w, http.StatusBadRequest, "Configuration object was nil", s.Logger)
re... | [
"func",
"(",
"s",
"*",
"Service",
")",
"Config",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"ctx",
":=",
"r",
".",
"Context",
"(",
")",
"\n\n",
"config",
",",
"err",
":=",
"s",
".",
"Store",
".",
"... | // Config retrieves the global application configuration | [
"Config",
"retrieves",
"the",
"global",
"application",
"configuration"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/server/config.go#L45-L61 |
123,692 | influxdata/influxdb | chronograf/server/config.go | ReplaceAuthConfig | func (s *Service) ReplaceAuthConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
var authConfig chronograf.AuthConfig
if err := json.NewDecoder(r.Body).Decode(&authConfig); err != nil {
invalidJSON(w, s.Logger)
return
}
config, err := s.Store.Config(ctx).Get(ctx)
if err != nil {
Error(w, h... | go | func (s *Service) ReplaceAuthConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
var authConfig chronograf.AuthConfig
if err := json.NewDecoder(r.Body).Decode(&authConfig); err != nil {
invalidJSON(w, s.Logger)
return
}
config, err := s.Store.Config(ctx).Get(ctx)
if err != nil {
Error(w, h... | [
"func",
"(",
"s",
"*",
"Service",
")",
"ReplaceAuthConfig",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"ctx",
":=",
"r",
".",
"Context",
"(",
")",
"\n\n",
"var",
"authConfig",
"chronograf",
".",
"AuthConfi... | // ReplaceAuthConfig replaces the auth section of the global application configuration | [
"ReplaceAuthConfig",
"replaces",
"the",
"auth",
"section",
"of",
"the",
"global",
"application",
"configuration"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/server/config.go#L84-L111 |
123,693 | influxdata/influxdb | http/api_handler.go | PrometheusCollectors | func (b *APIBackend) PrometheusCollectors() []prometheus.Collector {
var cs []prometheus.Collector
if pc, ok := b.WriteEventRecorder.(prom.PrometheusCollector); ok {
cs = append(cs, pc.PrometheusCollectors()...)
}
if pc, ok := b.QueryEventRecorder.(prom.PrometheusCollector); ok {
cs = append(cs, pc.Prometheus... | go | func (b *APIBackend) PrometheusCollectors() []prometheus.Collector {
var cs []prometheus.Collector
if pc, ok := b.WriteEventRecorder.(prom.PrometheusCollector); ok {
cs = append(cs, pc.PrometheusCollectors()...)
}
if pc, ok := b.QueryEventRecorder.(prom.PrometheusCollector); ok {
cs = append(cs, pc.Prometheus... | [
"func",
"(",
"b",
"*",
"APIBackend",
")",
"PrometheusCollectors",
"(",
")",
"[",
"]",
"prometheus",
".",
"Collector",
"{",
"var",
"cs",
"[",
"]",
"prometheus",
".",
"Collector",
"\n\n",
"if",
"pc",
",",
"ok",
":=",
"b",
".",
"WriteEventRecorder",
".",
... | // PrometheusCollectors exposes the prometheus collectors associated with an APIBackend. | [
"PrometheusCollectors",
"exposes",
"the",
"prometheus",
"collectors",
"associated",
"with",
"an",
"APIBackend",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/http/api_handler.go#L83-L95 |
123,694 | influxdata/influxdb | toml/toml.go | UnmarshalText | func (d *Duration) UnmarshalText(text []byte) error {
// Ignore if there is no value set.
if len(text) == 0 {
return nil
}
// Otherwise parse as a duration formatted string.
duration, err := time.ParseDuration(string(text))
if err != nil {
return err
}
// Set duration and return.
*d = Duration(duration)
... | go | func (d *Duration) UnmarshalText(text []byte) error {
// Ignore if there is no value set.
if len(text) == 0 {
return nil
}
// Otherwise parse as a duration formatted string.
duration, err := time.ParseDuration(string(text))
if err != nil {
return err
}
// Set duration and return.
*d = Duration(duration)
... | [
"func",
"(",
"d",
"*",
"Duration",
")",
"UnmarshalText",
"(",
"text",
"[",
"]",
"byte",
")",
"error",
"{",
"// Ignore if there is no value set.",
"if",
"len",
"(",
"text",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"// Otherwise parse as a dura... | // UnmarshalText parses a TOML value into a duration value. | [
"UnmarshalText",
"parses",
"a",
"TOML",
"value",
"into",
"a",
"duration",
"value",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/toml/toml.go#L27-L42 |
123,695 | influxdata/influxdb | toml/toml.go | MarshalText | func (d Duration) MarshalText() (text []byte, err error) {
return []byte(d.String()), nil
} | go | func (d Duration) MarshalText() (text []byte, err error) {
return []byte(d.String()), nil
} | [
"func",
"(",
"d",
"Duration",
")",
"MarshalText",
"(",
")",
"(",
"text",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"return",
"[",
"]",
"byte",
"(",
"d",
".",
"String",
"(",
")",
")",
",",
"nil",
"\n",
"}"
] | // MarshalText converts a duration to a string for decoding toml | [
"MarshalText",
"converts",
"a",
"duration",
"to",
"a",
"string",
"for",
"decoding",
"toml"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/toml/toml.go#L45-L47 |
123,696 | influxdata/influxdb | toml/toml.go | UnmarshalText | func (s *Size) UnmarshalText(text []byte) error {
if len(text) == 0 {
return fmt.Errorf("size was empty")
}
// The multiplier defaults to 1 in case the size has
// no suffix (and is then just raw bytes)
mult := uint64(1)
// Preserve the original text for error messages
sizeText := text
// Parse unit of mea... | go | func (s *Size) UnmarshalText(text []byte) error {
if len(text) == 0 {
return fmt.Errorf("size was empty")
}
// The multiplier defaults to 1 in case the size has
// no suffix (and is then just raw bytes)
mult := uint64(1)
// Preserve the original text for error messages
sizeText := text
// Parse unit of mea... | [
"func",
"(",
"s",
"*",
"Size",
")",
"UnmarshalText",
"(",
"text",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"len",
"(",
"text",
")",
"==",
"0",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"// The multiplier defaul... | // UnmarshalText parses a byte size from text. | [
"UnmarshalText",
"parses",
"a",
"byte",
"size",
"from",
"text",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/toml/toml.go#L55-L97 |
123,697 | influxdata/influxdb | http/requests.go | queryOrganization | func queryOrganization(ctx context.Context, r *http.Request, svc platform.OrganizationService) (o *platform.Organization, err error) {
filter := platform.OrganizationFilter{}
if reqID := r.URL.Query().Get(OrgID); reqID != "" {
filter.ID, err = platform.IDFromString(reqID)
if err != nil {
return nil, err
}
}... | go | func queryOrganization(ctx context.Context, r *http.Request, svc platform.OrganizationService) (o *platform.Organization, err error) {
filter := platform.OrganizationFilter{}
if reqID := r.URL.Query().Get(OrgID); reqID != "" {
filter.ID, err = platform.IDFromString(reqID)
if err != nil {
return nil, err
}
}... | [
"func",
"queryOrganization",
"(",
"ctx",
"context",
".",
"Context",
",",
"r",
"*",
"http",
".",
"Request",
",",
"svc",
"platform",
".",
"OrganizationService",
")",
"(",
"o",
"*",
"platform",
".",
"Organization",
",",
"err",
"error",
")",
"{",
"filter",
"... | // queryOrganization returns the organization for any http request. | [
"queryOrganization",
"returns",
"the",
"organization",
"for",
"any",
"http",
"request",
"."
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/http/requests.go#L18-L32 |
123,698 | influxdata/influxdb | chronograf/server/org_config.go | OrganizationConfig | func (s *Service) OrganizationConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
orgID, ok := hasOrganizationContext(ctx)
if !ok {
Error(w, http.StatusBadRequest, "Organization not found on context", s.Logger)
return
}
config, err := s.Store.OrganizationConfig(ctx).FindOrCreate(ctx, orgID)
... | go | func (s *Service) OrganizationConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
orgID, ok := hasOrganizationContext(ctx)
if !ok {
Error(w, http.StatusBadRequest, "Organization not found on context", s.Logger)
return
}
config, err := s.Store.OrganizationConfig(ctx).FindOrCreate(ctx, orgID)
... | [
"func",
"(",
"s",
"*",
"Service",
")",
"OrganizationConfig",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"ctx",
":=",
"r",
".",
"Context",
"(",
")",
"\n\n",
"orgID",
",",
"ok",
":=",
"hasOrganizationContext... | // OrganizationConfig retrieves the organization-wide config settings | [
"OrganizationConfig",
"retrieves",
"the",
"organization",
"-",
"wide",
"config",
"settings"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/server/org_config.go#L46-L63 |
123,699 | influxdata/influxdb | chronograf/server/org_config.go | ReplaceOrganizationLogViewerConfig | func (s *Service) ReplaceOrganizationLogViewerConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
orgID, ok := hasOrganizationContext(ctx)
if !ok {
Error(w, http.StatusBadRequest, "Organization not found on context", s.Logger)
return
}
var logViewerConfig chronograf.LogViewerConfig
if err :=... | go | func (s *Service) ReplaceOrganizationLogViewerConfig(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
orgID, ok := hasOrganizationContext(ctx)
if !ok {
Error(w, http.StatusBadRequest, "Organization not found on context", s.Logger)
return
}
var logViewerConfig chronograf.LogViewerConfig
if err :=... | [
"func",
"(",
"s",
"*",
"Service",
")",
"ReplaceOrganizationLogViewerConfig",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"ctx",
":=",
"r",
".",
"Context",
"(",
")",
"\n\n",
"orgID",
",",
"ok",
":=",
"hasOrg... | // ReplaceOrganizationLogViewerConfig replaces the log viewer UI section of the organization config | [
"ReplaceOrganizationLogViewerConfig",
"replaces",
"the",
"log",
"viewer",
"UI",
"section",
"of",
"the",
"organization",
"config"
] | 16d0bbb0cd468fd51f412021a76ae5c4b450dea8 | https://github.com/influxdata/influxdb/blob/16d0bbb0cd468fd51f412021a76ae5c4b450dea8/chronograf/server/org_config.go#L89-L121 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.