{"id":17573917,"url":"https://github.com/zgiber/funnel","last_synced_at":"2025-03-29T15:31:29.381Z","repository":{"id":85532666,"uuid":"52872027","full_name":"zgiber/funnel","owner":"zgiber","description":"Package for collecting metrics and/or events for various backends.","archived":false,"fork":false,"pushed_at":"2016-03-02T13:43:49.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-04T16:23:26.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zgiber.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-01T11:30:33.000Z","updated_at":"2016-03-01T11:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef6480ee-7ac2-4057-82cc-2984d850da1d","html_url":"https://github.com/zgiber/funnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Ffunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Ffunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Ffunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Ffunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zgiber","download_url":"https://codeload.github.com/zgiber/funnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246204861,"owners_count":20740401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-21T21:43:04.835Z","updated_at":"2025-03-29T15:31:29.365Z","avatar_url":"https://github.com/zgiber.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# funnel\n--\n    import \"github.com/zgiber/funnel\"\n\n\n## Usage\n\n#### type DataPoint\n\n```go\ntype DataPoint interface {\n\tMetricName() string\n\tType() StreamType\n\tTags() map[string]interface{}\n\tValue() interface{}\n\tTimeStamp() int64\n}\n```\n\nDataPoint is an interface representing one measurement or sample\n\n#### func  NewDataPoint\n\n```go\nfunc NewDataPoint(m *Metric, value interface{}, t time.Time, tags map[string]interface{}) DataPoint\n```\nNewDataPoint returns a dataPoint for a metric with a given value, time, and\ntags.\n\n#### type Gatherer\n\n```go\ntype Gatherer interface {\n\tGather(DataPoint) error\n\tAccepts(StreamType) bool\n}\n```\n\n\n#### func  NewDataDogBackend\n\n```go\nfunc NewDataDogBackend(addr string) (Gatherer, error)\n```\nNewDataDogBackend returns a Gatherer which collects datapoints to the specified\nDataDog address. It uses the datadog statsd package with the buffered client.\n\n#### func  NewInfluxBackend\n\n```go\nfunc NewInfluxBackend() Gatherer\n```\n\n#### type Metric\n\n```go\ntype Metric struct {\n\tName            string\n\tTimeStampFormat uint8\n\tType            StreamType\n\tUnit            string\n}\n```\n\nMetric is a struct with fields that have the same value in every DataPoint\nwithin a measurement/event stream\n\n#### type StreamType\n\n```go\ntype StreamType int\n```\n\n\n```go\nconst (\n\t// Seconds is the format for unix timestamps in a DataPoint\n\tSeconds = 0\n\t// Milliseconds is the format for milliseconds timestamps used in certain databases\n\tMilliseconds = 1\n\t// Nanoseconds is a format for nanoseconds based timestamps\n\tNanoseconds = 2\n\n\t// GaugeType is for recording float64 metric at given times\n\tGaugeType StreamType = 1 \u003c\u003c iota\n\t// CountType is for recording the number of received entries in one second\n\tCountType\n\t// EventType is for recording an event as it happens\n\tEventType\n\t// HistogramType tracks the statistical distribution of a set of values\n\tHistogramType\n\t// SetType counts the number of unique elements in a group\n\tSetType\n\t// SimpleEventType sends an event with the provided title and text\n\tSimpleEventType\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgiber%2Ffunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzgiber%2Ffunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgiber%2Ffunnel/lists"}