Documentation
¶
Index ¶
- Constants
- Variables
- func BulkInsert(db *gorm.DB, tableName, cols, path string) *gorm.DB
- func EnsureDir(dir string) error
- func GetServerStats() *proto.ServerStats
- func ResetServerStats(extras ...string)
- type Config
- type ConnStatsHandler
- func (c *ConnStatsHandler) HandleConn(ctx context.Context, connStats stats.ConnStats)
- func (c *ConnStatsHandler) HandleRPC(ctx context.Context, rpcStats stats.RPCStats)
- func (c *ConnStatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (c *ConnStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
- type Device
Constants ¶
View Source
const ( DataDir = "./data" TempDir = "./tmp" StatsInitialProcessing = "initialProcessing" StatsLastProcessing = "lastProcessing" StatsCount = "count" StatsSize = "size" StatsWorker = "worker" StatsWorkingTime = "workingTime" DefaultDateFormat = "2006-01-02 15:04:05" )
Variables ¶
View Source
var (
ServerStats *expvar.Map
)
Functions ¶
func GetServerStats ¶
func GetServerStats() *proto.ServerStats
func ResetServerStats ¶
func ResetServerStats(extras ...string)
Types ¶
type Config ¶
type Config struct { App struct { // Receiver Receiver struct { Insecure bool StorageDir string `json:"storage-dir"` Address string Classifier struct { Address string } } // Classifier Classifier struct { Address string Insecure bool Notifier struct { Address string } } // Notifier Notifier struct { Address string Insecure bool } Storage struct { Address string Bucket string AccessKey string `json:"access-key"` SecretKey string `json:"secret-key"` RetentionTimeSec int `json:"retention-time-sec"` } } Spring struct { Datasource struct { Url string Username string Password string } } }
func LoadConfig ¶
type ConnStatsHandler ¶
func (*ConnStatsHandler) HandleConn ¶
func (c *ConnStatsHandler) HandleConn(ctx context.Context, connStats stats.ConnStats)
func (*ConnStatsHandler) HandleRPC ¶
func (c *ConnStatsHandler) HandleRPC(ctx context.Context, rpcStats stats.RPCStats)
func (*ConnStatsHandler) TagConn ¶
func (c *ConnStatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
func (*ConnStatsHandler) TagRPC ¶
func (c *ConnStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
Click to show internal directories.
Click to hide internal directories.