Versions in this module Expand all Collapse all v0 v0.0.1 Nov 27, 2018 Changes in this version + const GolangMemoryFootprintFactor + var TestingT = &TestingTMock + func AddTableShardReporter(tableName string, shardID int) + func AdjustOffset(fromOffset, toOffset int, switchTs, ts int64) int64 + func AlignOffset(offset int, alignment int) int + func ApplyHTTPWrappers(handler http.HandlerFunc, wrappers []HTTPHandlerWrapper) http.HandlerFunc + func BoolFlag(longName, shortName string, defaultValue bool, description string) *bool + func CalculateDSTSwitchTs(fromTs, toTs int64, loc *time.Location) (switchTs int64, err error) + func CrossDST(fromTs, toTs int64, loc *time.Location) bool + func DeleteTableShardReporter(tableName string, shardID int) + func FormatTimeStampToUTC(ts int64) string + func GetConfig() common.AresServerConfig + func GetFuncName(f interface{}) string + func GetLogger() bark.Logger + func GetOrigin(r *http.Request) string + func GetQueryLogger() bark.Logger + func IndexOfInt(s []int, e int) int + func IndexOfStr(strs []string, target string) int + func Init(c common.AresServerConfig, l bark.Logger, ql bark.Logger, s tally.Scope) + func IntFlag(longName, shortName string, defaultValue int, description string) *int + func IsDev() bool + func IsProd() bool + func IsStaging() bool + func IsTest() bool + func LimitServe(port int, handler http.Handler, httpCfg common.HTTPConfig) + func Murmur3Sum32(key unsafe.Pointer, bytes int, seed uint32) uint32 + func NoCache(h http.Handler) http.Handler + func NoopHTTPWrapper(h http.HandlerFunc) http.HandlerFunc + func NormalizeUUIDString(uuidStr string) (string, error) + func Now() time.Time + func RecoverWrap(call func() error) (err error) + func ResetClockImplementation() + func SetClockImplementation(f NowFunc) + func SetCurrentTime(t time.Time) + func StringFlag(longName, shortName string, defaultValue string, description string) *string + func TimeStampToUTC(ts int64) time.Time + func WithMetricsFunc(h http.HandlerFunc) http.HandlerFunc + func WriteTable(dataSource TableDataSource) string + type APIError struct + Cause error + Code int + Message string + func (e APIError) Error() string + type AresEnv string + const EnvDev + const EnvProd + const EnvStaging + const EnvTest + func GetAresEnv() AresEnv + type BufferReader struct + func NewBufferReader(buffer []byte) BufferReader + func (b BufferReader) ReadFloat32(offset int) (float32, error) + func (b BufferReader) ReadInt16(offset int) (int16, error) + func (b BufferReader) ReadInt32(offset int) (int32, error) + func (b BufferReader) ReadInt8(offset int) (int8, error) + func (b BufferReader) ReadUint16(offset int) (uint16, error) + func (b BufferReader) ReadUint32(offset int) (uint32, error) + func (b BufferReader) ReadUint64(offset int) (uint64, error) + func (b BufferReader) ReadUint8(offset int) (uint8, error) + type BufferWriter struct + func NewBufferWriter(buffer []byte) BufferWriter + func (b *BufferWriter) AlignBytes(alignment int) + func (b *BufferWriter) Append(bs []byte) error + func (b *BufferWriter) AppendBool(value bool) error + func (b *BufferWriter) AppendFloat32(value float32) error + func (b *BufferWriter) AppendInt16(value int16) error + func (b *BufferWriter) AppendInt32(value int32) error + func (b *BufferWriter) AppendInt64(value int64) error + func (b *BufferWriter) AppendInt8(value int8) error + func (b *BufferWriter) AppendUint16(value uint16) error + func (b *BufferWriter) AppendUint32(value uint32) error + func (b *BufferWriter) AppendUint64(value uint64) error + func (b *BufferWriter) AppendUint8(value uint8) error + func (b *BufferWriter) SkipBits(bits int) + func (b *BufferWriter) SkipBytes(bytes int) + func (b *BufferWriter) Write(bs []byte) (int, error) + func (b *BufferWriter) WriteAt(bs []byte, offset int64) (int, error) + func (b *BufferWriter) WriteFloat32(value float32, offset int) error + func (b *BufferWriter) WriteInt16(value int16, offset int) error + func (b *BufferWriter) WriteInt32(value int32, offset int) error + func (b *BufferWriter) WriteInt64(value int64, offset int) error + func (b *BufferWriter) WriteInt8(value int8, offset int) error + func (b *BufferWriter) WriteUint16(value uint16, offset int) error + func (b *BufferWriter) WriteUint32(value uint32, offset int) error + func (b *BufferWriter) WriteUint64(value uint64, offset int) error + func (b *BufferWriter) WriteUint8(value uint8, offset int) error + func (b BufferWriter) GetOffset() int + type ClosableBuffer struct + func (cb *ClosableBuffer) Close() error + type ClosableReader struct + func (cr *ClosableReader) Close() error + type FileSystem interface + Mkdir func(name string, perm os.FileMode) error + MkdirAll func(path string, perm os.FileMode) error + OpenFileForWrite func(name string, flag int, perm os.FileMode) (io.WriteCloser, error) + ReadDir func(dirname string) ([]os.FileInfo, error) + ReadFile func(filename string) ([]byte, error) + Remove func(path string) error + RemoveAll func(path string) error + Stat func(path string) (os.FileInfo, error) + type HTTPHandlerWrapper func(handler http.HandlerFunc) http.HandlerFunc + type Int64Array []int64 + func (s Int64Array) Len() int + func (s Int64Array) Less(i, j int) bool + func (s Int64Array) Swap(i, j int) + type MetricName int + const AllocatedDeviceMemory + const AppendedRecords + const ArchivingHighWatermark + const ArchivingIgnoredRecords + const ArchivingLowWatermark + const ArchivingRecords + const ArchivingTimingTotal + const BackfillAffectedDays + const BackfillBufferFillRatio + const BackfillBufferNumRecords + const BackfillBufferSize + const BackfillDeleteThenInsertRecords + const BackfillInplaceUpdateRecords + const BackfillLockTiming + const BackfillNewRecords + const BackfillNoEffectRecords + const BackfillRecords + const BackfillRecordsColumnRemoved + const BackfillRecordsRatio + const BackfillRecordsTimeDifference + const BackfillTimingTotal + const BatchSize + const BatchSizeReportTime + const CurrentRedologCreationTime + const CurrentRedologSize + const DuplicateRecordRatio + const EstimatedDeviceMemory + const HTTPHandlerCall + const HTTPHandlerLatency + const IngestedRecords + const IngestedUpsertBatches + const IngestionLagPerColumn + const ManagedMemorySize + const MemoryOverflow + const NumMetricNames + const NumberOfEnumCasesPerColumn + const NumberOfRedologs + const PreloadingZoneEvicted + const PrimaryKeyMissing + const PurgeTimingTotal + const PurgedBatches + const QueryArchiveBatchProcessed + const QueryArchiveBytesTransferred + const QueryArchiveRecordsProcessed + const QueryFailed + const QueryLatency + const QueryLiveBatchProcessed + const QueryLiveBytesTransferred + const QueryLiveRecordsProcessed + const QueryReceived + const QueryRowsReturned + const QuerySucceeded + const QueryWaitForMemoryDuration + const RecordsFromFuture + const RecordsOutOfRetention + const RecoveryIgnoredRecords + const RecoveryIgnoredRecordsTimeDifference + const RecoveryLatency + const RedoLogFileCorrupt + const SchemaCreationCount + const SchemaDeletionCount + const SchemaFetchFailure + const SchemaFetchSuccess + const SchemaUpdateCount + const SizeOfRedologs + const SnapshotTimingBuildIndex + const SnapshotTimingLoad + const SnapshotTimingTotal + const TimeColumnMissing + const TimezoneLookupTableCreationTime + const TotalMemorySize + const UnmanagedMemorySize + const UpdatedRecords + type MetricType int + const Counter + const Gauge + const Timer + type NowFunc func() time.Time + type OSFileSystem struct + func (OSFileSystem) Mkdir(name string, perm os.FileMode) error + func (OSFileSystem) MkdirAll(path string, perm os.FileMode) error + func (OSFileSystem) OpenFileForWrite(name string, flag int, perm os.FileMode) (io.WriteCloser, error) + func (OSFileSystem) ReadDir(dirname string) ([]os.FileInfo, error) + func (OSFileSystem) ReadFile(name string) ([]byte, error) + func (OSFileSystem) Remove(path string) error + func (OSFileSystem) RemoveAll(path string) error + func (OSFileSystem) Stat(path string) (os.FileInfo, error) + type RWLocker interface + RLock func() + RUnlock func() + type ReaderSeekerCloser interface + type Reporter struct + func GetReporter(tableName string, shardID int) *Reporter + func GetRootReporter() *Reporter + func NewReporter(rootScope tally.Scope) *Reporter + func (r *Reporter) GetChildCounter(tags map[string]string, n MetricName) tally.Counter + func (r *Reporter) GetChildGauge(tags map[string]string, n MetricName) tally.Gauge + func (r *Reporter) GetChildTimer(tags map[string]string, n MetricName) tally.Timer + func (r *Reporter) GetCounter(n MetricName) tally.Counter + func (r *Reporter) GetGauge(n MetricName) tally.Gauge + func (r *Reporter) GetRootScope() tally.Scope + func (r *Reporter) GetTimer(n MetricName) tally.Timer + type ReporterFactory struct + func NewReporterFactory(rootScope tally.Scope) *ReporterFactory + func (f *ReporterFactory) AddTableShard(tableName string, shardID int) + func (f *ReporterFactory) DeleteTableShard(tableName string, shardID int) + func (f *ReporterFactory) GetReporter(tableName string, shardID int) *Reporter + func (f *ReporterFactory) GetRootReporter() *Reporter + type StackedError struct + Messages []string + Stack []string + func StackError(err error, message string, args ...interface{}) *StackedError + func (e *StackedError) Error() string + type StreamDataReader struct + func NewStreamDataReader(reader io.Reader) StreamDataReader + func (r *StreamDataReader) Read(bs []byte) error + func (r *StreamDataReader) ReadFloat32() (float32, error) + func (r *StreamDataReader) ReadInt16() (int16, error) + func (r *StreamDataReader) ReadInt32() (int32, error) + func (r *StreamDataReader) ReadInt8() (int8, error) + func (r *StreamDataReader) ReadPadding(nbytes int, alignment int) error + func (r *StreamDataReader) ReadUint16() (uint16, error) + func (r *StreamDataReader) ReadUint32() (uint32, error) + func (r *StreamDataReader) ReadUint64() (uint64, error) + func (r *StreamDataReader) ReadUint8() (uint8, error) + func (r *StreamDataReader) SkipBytes(nbytes int) error + func (r StreamDataReader) GetBytesRead() uint32 + type StreamDataWriter struct + func NewStreamDataWriter(writer io.Writer) StreamDataWriter + func (w *StreamDataWriter) SkipBytes(nbytes int) error + func (w *StreamDataWriter) Write(bs []byte) error + func (w *StreamDataWriter) WriteFloat32(v float32) error + func (w *StreamDataWriter) WriteInt16(v int16) error + func (w *StreamDataWriter) WriteInt32(v int32) error + func (w *StreamDataWriter) WriteInt8(v int8) error + func (w *StreamDataWriter) WritePadding(nbytes int, alignment int) error + func (w *StreamDataWriter) WriteUint16(v uint16) error + func (w *StreamDataWriter) WriteUint32(v uint32) error + func (w *StreamDataWriter) WriteUint64(v uint64) error + func (w *StreamDataWriter) WriteUint8(v uint8) error + func (w StreamDataWriter) GetBytesWritten() uint32 + type TableDataSource interface + ColumnHeaders func() []string + GetValue func(row, col int) interface{} + NumRows func() int + type TestingTMock struct + func (*TestingTMock) Errorf(format string, args ...interface{}) + func (*TestingTMock) FailNow() + func (*TestingTMock) Logf(format string, args ...interface{}) + type TimeIncrementer struct + IncBySecond int64 + func (r *TimeIncrementer) Now() time.Time + type Uint32Array []uint32 + func (s Uint32Array) Len() int + func (s Uint32Array) Less(i, j int) bool + func (s Uint32Array) Swap(i, j int)