├── .gitignore ├── vendor ├── github.com │ ├── blendlabs │ │ ├── go-util │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── error.go │ │ │ ├── random.go │ │ │ ├── ansi_colors_test.go │ │ │ ├── collections │ │ │ │ ├── queue.go │ │ │ │ ├── string_array_test.go │ │ │ │ ├── rate_limiter_test.go │ │ │ │ ├── string_array.go │ │ │ │ ├── channel_queue_test.go │ │ │ │ └── rate_limiter.go │ │ │ ├── gcm_test.go │ │ │ ├── base64.go │ │ │ ├── gzip_test.go │ │ │ ├── time_test.go │ │ │ ├── crypto_test.go │ │ │ ├── boolean_test.go │ │ │ ├── gzip.go │ │ │ ├── .travis.yml │ │ │ ├── bitflag.go │ │ │ ├── sequence_test.go │ │ │ ├── LICENSE │ │ │ ├── boolean.go │ │ │ ├── vector_test.go │ │ │ ├── format.go │ │ │ └── vector.go │ │ └── go-exception │ │ │ ├── stack_test.go │ │ │ ├── .travis.yml │ │ │ └── LICENSE │ ├── wcharczuk │ │ └── go-chart │ │ │ ├── .gitignore │ │ │ ├── drawing │ │ │ ├── constants.go │ │ │ ├── README.md │ │ │ ├── image_filter.go │ │ │ ├── curve_test.go │ │ │ ├── painter.go │ │ │ ├── free_type_path.go │ │ │ ├── line.go │ │ │ ├── demux_flattener.go │ │ │ ├── transformer.go │ │ │ └── color_test.go │ │ │ ├── _images │ │ │ ├── goog_ltm.png │ │ │ ├── tvix_ltm.png │ │ │ ├── two_axis.png │ │ │ ├── bar_chart.png │ │ │ ├── ma_goog_ltm.png │ │ │ ├── pie_chart.png │ │ │ ├── spy_ltm_bbs.png │ │ │ └── stacked_bar.png │ │ │ ├── _examples │ │ │ ├── axes │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── basic │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── legend │ │ │ │ └── output.png │ │ │ ├── min_max │ │ │ │ └── output.png │ │ │ ├── scatter │ │ │ │ └── output.png │ │ │ ├── twoaxis │ │ │ │ └── output.png │ │ │ ├── bar_chart │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── pie_chart │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── twopoint │ │ │ │ └── output.png │ │ │ ├── annotations │ │ │ │ └── output.png │ │ │ ├── axes_labels │ │ │ │ └── output.png │ │ │ ├── custom_ticks │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── descending │ │ │ │ └── output.png │ │ │ ├── legend_left │ │ │ │ └── output.png │ │ │ ├── market_hours │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── stacked_bar │ │ │ │ └── output.png │ │ │ ├── timeseries │ │ │ │ └── output.png │ │ │ ├── custom_padding │ │ │ │ └── output.png │ │ │ ├── custom_ranges │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── custom_styles │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── stock_analysis │ │ │ │ └── output.png │ │ │ ├── text_rotation │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── custom_formatters │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── linear_regression │ │ │ │ └── output.png │ │ │ ├── poly_regression │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ ├── request_timings │ │ │ │ └── output.png │ │ │ ├── benchmark_line_charts │ │ │ │ └── output.png │ │ │ ├── simple_moving_average │ │ │ │ ├── output.png │ │ │ │ └── main.go │ │ │ └── image_writer │ │ │ │ └── main.go │ │ │ ├── renderer_provider.go │ │ │ ├── Makefile │ │ │ ├── renderable.go │ │ │ ├── value_formatter_provider.go │ │ │ ├── .travis.yml │ │ │ ├── series.go │ │ │ ├── util │ │ │ ├── date_windows.go │ │ │ ├── date_posix.go │ │ │ ├── time.go │ │ │ └── file_util.go │ │ │ ├── matrix │ │ │ ├── vector.go │ │ │ ├── regression_test.go │ │ │ ├── util.go │ │ │ └── regression.go │ │ │ ├── seq │ │ │ ├── array.go │ │ │ ├── random_test.go │ │ │ ├── util.go │ │ │ └── linear_test.go │ │ │ ├── grid_line_test.go │ │ │ ├── continuous_range_test.go │ │ │ ├── font.go │ │ │ ├── legend_test.go │ │ │ ├── polynomial_regression_test.go │ │ │ ├── histogram_series_test.go │ │ │ ├── jet.go │ │ │ ├── range.go │ │ │ ├── concat_series_test.go │ │ │ ├── image_writer.go │ │ │ ├── LICENSE │ │ │ ├── concat_series.go │ │ │ ├── last_value_annotation_series.go │ │ │ ├── value.go │ │ │ ├── bollinger_band_series_test.go │ │ │ └── tick_test.go │ ├── unrolled │ │ └── render │ │ │ ├── fixtures │ │ │ ├── template-dir-test │ │ │ │ ├── 0.tmpl │ │ │ │ ├── subdir │ │ │ │ │ └── 1.tmpl │ │ │ │ └── dedicated.tmpl │ │ │ │ │ └── notbad.tmpl │ │ │ ├── basic │ │ │ │ ├── hypertext.html │ │ │ │ ├── content.tmpl │ │ │ │ ├── delims.tmpl │ │ │ │ ├── hello.tmpl │ │ │ │ ├── admin │ │ │ │ │ └── index.tmpl │ │ │ │ ├── layout.tmpl │ │ │ │ ├── another_layout.tmpl │ │ │ │ └── current_layout.tmpl │ │ │ ├── custom_funcs │ │ │ │ └── index.tmpl │ │ │ ├── blocks │ │ │ │ ├── content-partial.tmpl │ │ │ │ ├── layout.tmpl │ │ │ │ └── content.tmpl │ │ │ ├── partials │ │ │ │ ├── content-partial.tmpl │ │ │ │ ├── layout.tmpl │ │ │ │ └── content.tmpl │ │ │ └── amber │ │ │ │ ├── example.amber │ │ │ │ └── layouts │ │ │ │ └── base.amber │ │ │ ├── .travis.yml │ │ │ ├── .gitignore │ │ │ ├── helpers.go │ │ │ ├── helpers_pre16.go │ │ │ ├── LICENSE │ │ │ ├── buffer.go │ │ │ └── render_data_test.go │ ├── rootsongjc │ │ └── k8s-app-monitor-test │ │ │ ├── vendor │ │ │ └── github.com │ │ │ │ ├── unrolled │ │ │ │ └── render │ │ │ │ │ ├── fixtures │ │ │ │ │ ├── template-dir-test │ │ │ │ │ │ ├── 0.tmpl │ │ │ │ │ │ ├── subdir │ │ │ │ │ │ │ └── 1.tmpl │ │ │ │ │ │ └── dedicated.tmpl │ │ │ │ │ │ │ └── notbad.tmpl │ │ │ │ │ ├── basic │ │ │ │ │ │ ├── hypertext.html │ │ │ │ │ │ ├── content.tmpl │ │ │ │ │ │ ├── delims.tmpl │ │ │ │ │ │ ├── hello.tmpl │ │ │ │ │ │ ├── admin │ │ │ │ │ │ │ └── index.tmpl │ │ │ │ │ │ ├── layout.tmpl │ │ │ │ │ │ ├── another_layout.tmpl │ │ │ │ │ │ └── current_layout.tmpl │ │ │ │ │ ├── custom_funcs │ │ │ │ │ │ └── index.tmpl │ │ │ │ │ ├── blocks │ │ │ │ │ │ ├── content-partial.tmpl │ │ │ │ │ │ ├── layout.tmpl │ │ │ │ │ │ └── content.tmpl │ │ │ │ │ ├── partials │ │ │ │ │ │ ├── content-partial.tmpl │ │ │ │ │ │ ├── layout.tmpl │ │ │ │ │ │ └── content.tmpl │ │ │ │ │ └── amber │ │ │ │ │ │ ├── example.amber │ │ │ │ │ │ └── layouts │ │ │ │ │ │ └── base.amber │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── helpers.go │ │ │ │ │ ├── helpers_pre16.go │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── buffer.go │ │ │ │ │ └── render_data_test.go │ │ │ │ ├── gorilla │ │ │ │ ├── context │ │ │ │ │ ├── README.md │ │ │ │ │ └── .travis.yml │ │ │ │ └── mux │ │ │ │ │ └── .travis.yml │ │ │ │ └── codegangsta │ │ │ │ └── negroni │ │ │ │ ├── logger_test.go │ │ │ │ ├── doc.go │ │ │ │ ├── logger.go │ │ │ │ ├── CHANGELOG.md │ │ │ │ └── LICENSE │ │ │ ├── glide.yaml │ │ │ ├── buildlocal │ │ │ ├── main.go │ │ │ ├── README.md │ │ │ ├── glide.lock │ │ │ ├── manifest.yaml │ │ │ ├── wercker.yml │ │ │ └── service │ │ │ ├── server.go │ │ │ ├── handlers.go │ │ │ └── repo.go │ ├── golang │ │ └── freetype │ │ │ ├── licenses │ │ │ └── ftl.txt │ │ │ ├── testdata │ │ │ ├── luximr.ttf │ │ │ ├── luxirr.ttf │ │ │ ├── luxisr.ttf │ │ │ └── README │ │ │ ├── LICENSE │ │ │ ├── AUTHORS │ │ │ ├── README │ │ │ └── truetype │ │ │ └── face_test.go │ ├── gorilla │ │ ├── context │ │ │ ├── README.md │ │ │ └── .travis.yml │ │ └── mux │ │ │ └── .travis.yml │ └── codegangsta │ │ └── negroni │ │ ├── logger_test.go │ │ ├── doc.go │ │ ├── logger.go │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── recovery_test.go │ │ └── recovery.go └── golang.org │ └── x │ └── image │ ├── codereview.cfg │ ├── .gitignore │ ├── testdata │ ├── tux.png │ ├── no_rps.tiff │ ├── bw-deflate.tiff │ ├── testpattern.png │ ├── video-001.bmp │ ├── video-001.png │ ├── video-001.tiff │ ├── yellow_rose.png │ ├── bw-packbits.tiff │ ├── no_compress.tiff │ ├── tux-rotate-ab.png │ ├── tux-rotate-bl.png │ ├── tux-rotate-cr.png │ ├── tux-rotate-nn.png │ ├── tux.lossless.webp │ ├── blue-purple-pink.png │ ├── bw-uncompressed.tiff │ ├── gopher-doc.1bpp.png │ ├── gopher-doc.2bpp.png │ ├── gopher-doc.4bpp.png │ ├── gopher-doc.8bpp.png │ ├── video-001-16bit.tiff │ ├── video-001-gray.tiff │ ├── video-001.lossy.webp │ ├── go-turns-two-14x18.png │ ├── go-turns-two-up-ab.png │ ├── go-turns-two-up-bl.png │ ├── go-turns-two-up-cr.png │ ├── go-turns-two-up-nn.png │ ├── yellow_rose-small.bmp │ ├── yellow_rose-small.png │ ├── yellow_rose.lossy.webp │ ├── go-turns-two-280x360.jpeg │ ├── go-turns-two-down-ab.png │ ├── go-turns-two-down-bl.png │ ├── go-turns-two-down-cr.png │ ├── go-turns-two-down-nn.png │ ├── video-001-gray-16bit.tiff │ ├── video-001-paletted.tiff │ ├── video-001-strip-64.tiff │ ├── video-001-tile-64x64.tiff │ ├── yellow_rose.lossless.webp │ ├── blue-purple-pink-large.png │ ├── blue-purple-pink.lossy.webp │ ├── go-turns-two-rotate-ab.png │ ├── go-turns-two-rotate-bl.png │ ├── go-turns-two-rotate-cr.png │ ├── go-turns-two-rotate-nn.png │ ├── video-001-uncompressed.tiff │ ├── blue-purple-pink.lossless.webp │ ├── gopher-doc.1bpp.lossless.webp │ ├── gopher-doc.2bpp.lossless.webp │ ├── gopher-doc.4bpp.lossless.webp │ ├── gopher-doc.8bpp.lossless.webp │ ├── video-001.lossy.webp.ycbcr.png │ ├── yellow_rose.lossy.webp.ycbcr.png │ ├── blue-purple-pink.lzwcompressed.tiff │ ├── yellow_rose.lossy-with-alpha.webp │ ├── blue-purple-pink-large.lossless.webp │ ├── blue-purple-pink.lossy.webp.ycbcr.png │ ├── blue-purple-pink-large.no-filter.lossy.webp │ ├── yellow_rose.lossy-with-alpha.webp.nycbcra.png │ ├── blue-purple-pink-large.normal-filter.lossy.webp │ ├── blue-purple-pink-large.simple-filter.lossy.webp │ ├── blue-purple-pink-large.no-filter.lossy.webp.ycbcr.png │ ├── blue-purple-pink-large.normal-filter.lossy.webp.ycbcr.png │ └── blue-purple-pink-large.simple-filter.lossy.webp.ycbcr.png │ ├── font │ ├── testdata │ │ ├── CFFTest.otf │ │ ├── cmapTest.ttf │ │ ├── glyfTest.ttf │ │ ├── fixed │ │ │ ├── 7x13.0000 │ │ │ ├── 7x13.0100 │ │ │ ├── 7x13.0200 │ │ │ ├── 7x13.0300 │ │ │ ├── 7x13.0400 │ │ │ ├── 7x13.0500 │ │ │ ├── 7x13.0E00 │ │ │ ├── 7x13.1000 │ │ │ ├── 7x13.1600 │ │ │ ├── 7x13.1E00 │ │ │ ├── 7x13.1F00 │ │ │ ├── 7x13.2000 │ │ │ ├── 7x13.2100 │ │ │ ├── 7x13.2200 │ │ │ ├── 7x13.2300 │ │ │ ├── 7x13.2400 │ │ │ ├── 7x13.2500 │ │ │ ├── 7x13.2600 │ │ │ ├── 7x13.2700 │ │ │ ├── 7x13.2800 │ │ │ ├── 7x13.2A00 │ │ │ ├── 7x13.3000 │ │ │ ├── 7x13.FB00 │ │ │ ├── 7x13.FE00 │ │ │ ├── 7x13.FF00 │ │ │ └── README │ │ └── README │ ├── gofont │ │ └── ttfs │ │ │ ├── Go-Bold.ttf │ │ │ ├── Go-Mono.ttf │ │ │ ├── Go-Italic.ttf │ │ │ ├── Go-Medium.ttf │ │ │ ├── Go-Regular.ttf │ │ │ ├── Go-Mono-Bold.ttf │ │ │ ├── Go-Smallcaps.ttf │ │ │ ├── Go-Bold-Italic.ttf │ │ │ ├── Go-Mono-Italic.ttf │ │ │ ├── Go-Medium-Italic.ttf │ │ │ ├── Go-Mono-Bold-Italic.ttf │ │ │ └── Go-Smallcaps-Italic.ttf │ ├── plan9font │ │ └── plan9font_test.go │ └── inconsolata │ │ └── inconsolata.go │ ├── README │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── .gitattributes │ ├── colornames │ ├── colornames.go │ └── colornames_test.go │ ├── vector │ ├── acc_other.go │ └── acc_amd64.go │ ├── tiff │ ├── buffer_test.go │ └── compress.go │ ├── CONTRIBUTING.md │ ├── math │ ├── f32 │ │ └── f32.go │ └── f64 │ │ └── f64.go │ ├── PATENTS │ └── webp │ └── webp.go ├── images └── chart.png ├── chart ├── requirements.yaml ├── Chart.yaml ├── .helmignore ├── templates │ ├── service.yaml │ ├── ingress.yaml │ ├── _helpers.tpl │ └── NOTES.txt └── values.yaml ├── Dockerfile ├── glide.yaml ├── k8s └── kompose │ ├── k8s-app-monitor-agent-ingress.yaml │ ├── k8s-app-monitor-agent-service.yaml │ ├── k8s-app-monitor-test-service.yaml │ ├── k8s-app-monitor-test-deployment.yaml │ └── k8s-app-monitor-agent-deployment.yaml ├── docker-compose.yaml ├── Makefile ├── wercker.yml ├── manifest.yaml ├── README.md └── glide.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/template-dir-test/0.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/hypertext.html: -------------------------------------------------------------------------------- 1 | Hypertext! 2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/template-dir-test/subdir/1.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/content.tmpl: -------------------------------------------------------------------------------- 1 |

{{ . }}

2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/delims.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {[{.}]}

-------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/hello.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/template-dir-test/dedicated.tmpl/notbad.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/admin/index.tmpl: -------------------------------------------------------------------------------- 1 |

Admin {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/custom_funcs/index.tmpl: -------------------------------------------------------------------------------- 1 | {{ myCustomFunc }} 2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/layout.tmpl: -------------------------------------------------------------------------------- 1 | head 2 | {{ yield }} 3 | foot 4 | -------------------------------------------------------------------------------- /images/chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/images/chart.png -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/template-dir-test/0.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/another_layout.tmpl: -------------------------------------------------------------------------------- 1 | another head 2 | {{ yield }} 3 | another foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/hypertext.html: -------------------------------------------------------------------------------- 1 | Hypertext! 2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/template-dir-test/subdir/1.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/content.tmpl: -------------------------------------------------------------------------------- 1 |

{{ . }}

2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/delims.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {[{.}]}

-------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/basic/current_layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ current }} head 2 | {{ yield }} 3 | {{ current }} foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/blocks/content-partial.tmpl: -------------------------------------------------------------------------------- 1 | {{define "after-content-partial"}}after {{ . }}{{end}} 2 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/blocks/layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ block "before" }} 2 |

during

3 | {{ block "after" }} 4 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/partials/content-partial.tmpl: -------------------------------------------------------------------------------- 1 | {{define "after-content-partial"}}after {{ . }}{{end}} 2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/hello.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/template-dir-test/dedicated.tmpl/notbad.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/partials/layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ partial "before" }} 2 |

during

3 | {{ partial "after" }} 4 | -------------------------------------------------------------------------------- /chart/requirements.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: k8s-app-monitor-test 3 | version: 0.1.0 4 | repository: http://localhost:8879 5 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/admin/index.tmpl: -------------------------------------------------------------------------------- 1 |

Admin {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/custom_funcs/index.tmpl: -------------------------------------------------------------------------------- 1 | {{ myCustomFunc }} 2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/layout.tmpl: -------------------------------------------------------------------------------- 1 | head 2 | {{ yield }} 3 | foot 4 | -------------------------------------------------------------------------------- /chart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: k8s-app-monitor-agent 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/no_rps.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/no_rps.tiff -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/licenses/ftl.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/golang/freetype/licenses/ftl.txt -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/another_layout.tmpl: -------------------------------------------------------------------------------- 1 | another head 2 | {{ yield }} 3 | another foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/blocks/content.tmpl: -------------------------------------------------------------------------------- 1 | {{define "before-content"}}before {{ . }}{{end}} 2 | {{define "after-content"}}after {{ . }}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/partials/content.tmpl: -------------------------------------------------------------------------------- 1 | {{define "before-content"}}before {{ . }}{{end}} 2 | {{define "after-content"}}after {{ . }}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/constants.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | const ( 4 | // DefaultDPI is the default image DPI. 5 | DefaultDPI = 96.0 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/bw-deflate.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/bw-deflate.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/testpattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/testpattern.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001.bmp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/CFFTest.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/CFFTest.otf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/cmapTest.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/cmapTest.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/glyfTest.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/glyfTest.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/bw-packbits.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/bw-packbits.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/no_compress.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/no_compress.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux-rotate-ab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux-rotate-ab.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux-rotate-bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux-rotate-bl.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux-rotate-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux-rotate-cr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux-rotate-nn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux-rotate-nn.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/tux.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/tux.lossless.webp -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/testdata/luximr.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/golang/freetype/testdata/luximr.ttf -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/testdata/luxirr.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/golang/freetype/testdata/luxirr.ttf -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/testdata/luxisr.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/golang/freetype/testdata/luxisr.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Bold.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0000 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0100: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0100 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0200: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0200 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0300: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0300 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0400: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0400 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0500: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0500 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.0E00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.0E00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.1000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.1000 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.1600: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.1600 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.1E00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.1E00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.1F00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.1F00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2000 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2100: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2100 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2200: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2200 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2300: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2300 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2400: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2400 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2500: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2500 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2600: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2600 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2700: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2700 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2800: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2800 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.2A00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.2A00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.3000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.3000 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.FB00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.FB00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.FE00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.FE00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/7x13.FF00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/testdata/fixed/7x13.FF00 -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/bw-uncompressed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/bw-uncompressed.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.1bpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.1bpp.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.2bpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.2bpp.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.4bpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.4bpp.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.8bpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.8bpp.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-16bit.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-gray.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-gray.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001.lossy.webp -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/basic/current_layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ current }} head 2 | {{ yield }} 3 | {{ current }} foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/blocks/content-partial.tmpl: -------------------------------------------------------------------------------- 1 | {{define "after-content-partial"}}after {{ . }}{{end}} 2 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/blocks/layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ block "before" }} 2 |

during

3 | {{ block "after" }} 4 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/partials/content-partial.tmpl: -------------------------------------------------------------------------------- 1 | {{define "after-content-partial"}}after {{ . }}{{end}} 2 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/goog_ltm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/goog_ltm.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/tvix_ltm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/tvix_ltm.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/two_axis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/two_axis.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go image libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Medium.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Regular.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-14x18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-14x18.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-up-ab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-up-ab.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-up-bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-up-bl.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-up-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-up-cr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-up-nn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-up-nn.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose-small.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose-small.bmp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose-small.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.lossy.webp -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/partials/layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ partial "before" }} 2 |

during

3 | {{ partial "after" }} 4 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/bar_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/bar_chart.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/ma_goog_ltm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/ma_goog_ltm.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/pie_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/pie_chart.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/spy_ltm_bbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/spy_ltm_bbs.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_images/stacked_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_images/stacked_bar.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Bold.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-280x360.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-280x360.jpeg -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-down-ab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-down-ab.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-down-bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-down-bl.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-down-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-down-cr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-down-nn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-down-nn.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-gray-16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-gray-16bit.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-paletted.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-paletted.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-strip-64.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-strip-64.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-tile-64x64.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-tile-64x64.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.lossless.webp -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/axes/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/axes/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Bold-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Bold-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink.lossy.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-rotate-ab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-rotate-ab.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-rotate-bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-rotate-bl.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-rotate-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-rotate-cr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/go-turns-two-rotate-nn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/go-turns-two-rotate-nn.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001-uncompressed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001-uncompressed.tiff -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/basic/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/basic/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/legend/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/legend/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/min_max/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/min_max/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/scatter/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/scatter/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/twoaxis/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/twoaxis/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Medium-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Medium-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.1bpp.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.1bpp.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.2bpp.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.2bpp.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.4bpp.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.4bpp.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/gopher-doc.8bpp.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/gopher-doc.8bpp.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/video-001.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/video-001.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/bar_chart/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/bar_chart/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/pie_chart/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/pie_chart/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/twopoint/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/twopoint/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/renderer_provider.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // RendererProvider is a function that returns a renderer. 4 | type RendererProvider func(int, int) (Renderer, error) 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Bold-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Mono-Bold-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps-Italic.ttf -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/README: -------------------------------------------------------------------------------- 1 | CFFTest.sfd is a FontForge file for creating CFFTest.otf, a custom OpenType 2 | font for testing the golang.org/x/image/font/sfnt package's CFF support. 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/annotations/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/annotations/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/axes_labels/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/axes_labels/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_ticks/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/custom_ticks/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/descending/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/descending/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/legend_left/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/legend_left/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/market_hours/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/market_hours/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/stacked_bar/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/stacked_bar/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/timeseries/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/timeseries/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink.lzwcompressed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink.lzwcompressed.tiff -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.lossy-with-alpha.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.lossy-with-alpha.webp -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | ADD k8s-app-monitor-agent /usr/bin/ 4 | 5 | EXPOSE 8888 6 | 7 | ENV APP_PORT 3000 8 | ENV SERVICE_NAME localhost 9 | 10 | ENTRYPOINT /usr/bin/k8s-app-monitor-agent 11 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_padding/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/custom_padding/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_ranges/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/custom_ranges/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_styles/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/custom_styles/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/stock_analysis/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/stock_analysis/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/text_rotation/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/text_rotation/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.lossless.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.lossless.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/rootsongjc/k8s-app-monitor-agent 2 | import: 3 | - package: github.com/rootsongjc/k8s-app-monitor-test 4 | subpackages: 5 | - service 6 | - package: github.com/wcharczuk/go-chart 7 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/blocks/content.tmpl: -------------------------------------------------------------------------------- 1 | {{define "before-content"}}before {{ . }}{{end}} 2 | {{define "after-content"}}after {{ . }}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/partials/content.tmpl: -------------------------------------------------------------------------------- 1 | {{define "before-content"}}before {{ . }}{{end}} 2 | {{define "after-content"}}after {{ . }}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_formatters/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/custom_formatters/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/linear_regression/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/linear_regression/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/poly_regression/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/poly_regression/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/request_timings/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/request_timings/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/README.md: -------------------------------------------------------------------------------- 1 | go-util 2 | ======= 3 | 4 | This is a repository full of helper functions I've written over the years to make writing in golang a little easier. 5 | 6 | Most things have tests. -------------------------------------------------------------------------------- /vendor/golang.org/x/image/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/Makefile: -------------------------------------------------------------------------------- 1 | all: test 2 | 3 | test: 4 | @go test ./... 5 | 6 | cover: 7 | @go test -short -covermode=set -coverprofile=profile.cov 8 | @go tool cover -html=profile.cov 9 | @rm profile.cov -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/benchmark_line_charts/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/benchmark_line_charts/output.png -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/simple_moving_average/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/github.com/wcharczuk/go-chart/_examples/simple_moving_average/output.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.no-filter.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.no-filter.lossy.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/yellow_rose.lossy-with-alpha.webp.nycbcra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/yellow_rose.lossy-with-alpha.webp.nycbcra.png -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/amber/example.amber: -------------------------------------------------------------------------------- 1 | extends layouts/base 2 | 3 | block content 4 | p This is the page content! 5 | ul 6 | li This is 7 | li Some more 8 | li #{VarTwo} -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/renderable.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // Renderable is a function that can be called to render custom elements on the chart. 4 | type Renderable func(r Renderer, canvasBox Box, defaults Style) 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.normal-filter.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.normal-filter.lossy.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.simple-filter.lossy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.simple-filter.lossy.webp -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.no-filter.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.no-filter.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.normal-filter.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.normal-filter.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /vendor/golang.org/x/image/testdata/blue-purple-pink-large.simple-filter.lossy.webp.ycbcr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootsongjc/k8s-app-monitor-agent/HEAD/vendor/golang.org/x/image/testdata/blue-purple-pink-large.simple-filter.lossy.webp.ycbcr.png -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/rootsongjc/k8s-app-monitor-test 2 | import: 3 | - package: github.com/codegangsta/negroni 4 | - package: github.com/gorilla/mux 5 | - package: github.com/unrolled/render 6 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/value_formatter_provider.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // ValueFormatterProvider is a series that has custom formatters. 4 | type ValueFormatterProvider interface { 5 | GetValueFormatters() (x, y ValueFormatter) 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/buildlocal: -------------------------------------------------------------------------------- 1 | rm -rf _builds _steps _projects _cache _temp 2 | wercker build --git-domain github.com --git-owner rootsongjc --git-repository k8s-app-monitor-test 3 | rm -rf _builds _steps _projects _cache _temp  4 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6.2 5 | 6 | sudo: false 7 | 8 | before_script: 9 | - go get -u github.com/blendlabs/go-assert 10 | - go get ./... 11 | 12 | script: 13 | - go test ./... 14 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - 1.5 7 | - 1.6 8 | - tip 9 | 10 | install: 11 | - go get github.com/eknkc/amber 12 | 13 | script: 14 | - go test -v -race -tags=integration 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/amber/example.amber: -------------------------------------------------------------------------------- 1 | extends layouts/base 2 | 3 | block content 4 | p This is the page content! 5 | ul 6 | li This is 7 | li Some more 8 | li #{VarTwo} -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/error.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | // AnyError returns any variadic error that is not nil. 4 | func AnyError(err ...error) error { 5 | for x := 0; x < len(err); x++ { 6 | if err[x] != nil { 7 | return err[x] 8 | } 9 | } 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-exception/stack_test.go: -------------------------------------------------------------------------------- 1 | package exception 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestGetStackTrace(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | assert.NotEmpty(GetStackTrace()) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/series.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // Series is an alias to Renderable. 4 | type Series interface { 5 | GetName() string 6 | GetYAxis() YAxisType 7 | GetStyle() Style 8 | Validate() error 9 | Render(r Renderer, canvasBox Box, xrange, yrange Range, s Style) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - 1.5 7 | - 1.6 8 | - tip 9 | 10 | install: 11 | - go get github.com/eknkc/amber 12 | 13 | script: 14 | - go test -v -race -tags=integration 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/fixtures/amber/layouts/base.amber: -------------------------------------------------------------------------------- 1 | html 2 | head 3 | title Page Title 4 | body 5 | div#header 6 | ul 7 | li Home 8 | li Menu 9 | li About 10 | li #{VarOne} 11 | block content -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/README.md: -------------------------------------------------------------------------------- 1 | go-chart > drawing 2 | ================== 3 | 4 | The bulk of the code in this package is based on [draw2d](https://github.com/llgcode/draw2d), but 5 | with significant modifications to make the APIs more golang friendly and careful about units (points vs. pixels). -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.2 7 | - go: 1.3 8 | - go: 1.4 9 | - go: 1.5 10 | - go: 1.6 11 | - go: tip 12 | 13 | script: 14 | - go get -t -v ./... 15 | - diff -u <(echo -n) <(gofmt -d .) 16 | - go tool vet . 17 | - go test -v -race ./... 18 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/fixtures/amber/layouts/base.amber: -------------------------------------------------------------------------------- 1 | html 2 | head 3 | title Page Title 4 | body 5 | div#header 6 | ul 7 | li Home 8 | li Menu 9 | li About 10 | li #{VarOne} 11 | block content -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | service "github.com/rootsongjc/k8s-app-monitor-test/service" 7 | ) 8 | 9 | func main() { 10 | port := os.Getenv("PORT") 11 | if len(port) == 0 { 12 | port = "3000" 13 | } 14 | 15 | server := service.NewServer() 16 | server.Run(":" + port) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/random.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "math/rand" 5 | "time" 6 | ) 7 | 8 | var ( 9 | provider = rand.New(rand.NewSource(time.Now().UnixNano())) 10 | ) 11 | 12 | // RandomProvider returns a centralized random provider, seeded with time.Now().UnixNano(). 13 | func RandomProvider() *rand.Rand { 14 | return provider 15 | } 16 | -------------------------------------------------------------------------------- /k8s/kompose/k8s-app-monitor-agent-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: k8s-app-monitor-agent-ingress 5 | spec: 6 | rules: 7 | - host: k8s-app-monitor-agent.jimmysong.io 8 | http: 9 | paths: 10 | - path: / 11 | backend: 12 | serviceName: k8s-app-monitor-agent 13 | servicePort: 8888 14 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/image_filter.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | // ImageFilter defines the type of filter to use 4 | type ImageFilter int 5 | 6 | const ( 7 | // LinearFilter defines a linear filter 8 | LinearFilter ImageFilter = iota 9 | // BilinearFilter defines a bilinear filter 10 | BilinearFilter 11 | // BicubicFilter defines a bicubic filter 12 | BicubicFilter 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.2 7 | - go: 1.3 8 | - go: 1.4 9 | - go: 1.5 10 | - go: 1.6 11 | - go: tip 12 | 13 | script: 14 | - go get -t -v ./... 15 | - diff -u <(echo -n) <(gofmt -d .) 16 | - go tool vet . 17 | - go test -v -race ./... 18 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.3 7 | - go: 1.4 8 | - go: 1.5 9 | - go: 1.6 10 | - go: tip 11 | allow_failures: 12 | - go: tip 13 | 14 | script: 15 | - go get -t -v ./... 16 | - diff -u <(echo -n) <(gofmt -d .) 17 | - go vet $(go list ./... | grep -v /vendor/) 18 | - go test -v -race ./... 19 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/util/date_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package util 4 | 5 | import "time" 6 | 7 | // Eastern returns the eastern timezone. 8 | func (d date) Eastern() *time.Location { 9 | if _eastern == nil { 10 | _easternLock.Lock() 11 | defer _easternLock.Unlock() 12 | if _eastern == nil { 13 | _eastern, _ = time.LoadLocation("EST") 14 | } 15 | } 16 | return _eastern 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/colornames/colornames.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate go run gen.go 6 | 7 | // Package colornames provides named colors as defined in the SVG 1.1 spec. 8 | // 9 | // See http://www.w3.org/TR/SVG/types.html#ColorKeywords 10 | package colornames 11 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/util/date_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package util 4 | 5 | import "time" 6 | 7 | // Eastern returns the eastern timezone. 8 | func (d date) Eastern() *time.Location { 9 | if _eastern == nil { 10 | _easternLock.Lock() 11 | defer _easternLock.Unlock() 12 | if _eastern == nil { 13 | _eastern, _ = time.LoadLocation("America/New_York") 14 | } 15 | } 16 | return _eastern 17 | } 18 | -------------------------------------------------------------------------------- /chart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | 25 | 26 | *.pem 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.3 7 | - go: 1.4 8 | - go: 1.5 9 | - go: 1.6 10 | - go: tip 11 | allow_failures: 12 | - go: tip 13 | 14 | script: 15 | - go get -t -v ./... 16 | - diff -u <(echo -n) <(gofmt -d .) 17 | - go vet $(go list ./... | grep -v /vendor/) 18 | - go test -v -race ./... 19 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/matrix/vector.go: -------------------------------------------------------------------------------- 1 | package matrix 2 | 3 | // Vector is just an array of values. 4 | type Vector []float64 5 | 6 | // DotProduct returns the dot product of two vectors. 7 | func (v Vector) DotProduct(v2 Vector) (result float64, err error) { 8 | if len(v) != len(v2) { 9 | err = ErrDimensionMismatch 10 | return 11 | } 12 | 13 | for i := 0; i < len(v); i++ { 14 | result = result + (v[i] * v2[i]) 15 | } 16 | return 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/README.md: -------------------------------------------------------------------------------- 1 | [![wercker status](https://app.wercker.com/status/72a4489eb1a5f2c7667b09f235a65fcc/s/master "wercker status")](https://app.wercker.com/project/byKey/72a4489eb1a5f2c7667b09f235a65fcc) 2 | 3 | # Kubernetes application monitoring test 4 | This is an application for kubernetes monitoring used by [kubernetes-handbook](https://github.com/rootsongjc/kubernetes-handbook) 5 | 6 | See the API definition in [api.html](api.html). 7 | 8 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/ansi_colors_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestAnsiColorApply(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | escapedBlack := ColorBlack.escaped() 13 | assert.Equal("\033["+string(ColorBlack), escapedBlack) 14 | 15 | appliedBlack := ColorBlack.Apply("test") 16 | assert.Equal(ColorBlack.escaped()+"test"+ColorReset.escaped(), appliedBlack) 17 | } 18 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | k8s-app-monitor-agent: 4 | image: jimmysong/k8s-app-monitor-agent:234d51c 5 | container_name: monitor-agent 6 | depends_on: 7 | - k8s-app-monitor-test 8 | ports: 9 | - 8888:8888 10 | environment: 11 | - SERVICE_NAME=k8s-app-monitor-test 12 | k8s-app-monitor-test: 13 | image: jimmysong/k8s-app-monitor-test:9c935dd 14 | container_name: monitor-test 15 | ports: 16 | - 3000:3000 17 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | 25 | 26 | *.pem 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build run clean all 2 | 3 | export GOOS= linux 4 | 5 | export GOARCH=amd64 6 | 7 | repo=jimmysong 8 | imageName=k8s-app-monitor-agent 9 | tag=`git rev-parse --short HEAD` 10 | imageWholeName=${repo}/${imageName}:${tag} 11 | port=8888 12 | 13 | build: 14 | go build 15 | docker build -t jimmysong/k8s-app-monitor-agent:${tag} . 16 | 17 | run: 18 | docker run -d --name ${imageName} -p ${port}:${port} ${imageWholeName} 19 | clean: 20 | docker rm -f ${imageName} 21 | 22 | all: build run 23 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/queue.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | // Queue is an interface for implementations of a FIFO buffer. 4 | type Queue interface { 5 | Len() int 6 | Enqueue(value interface{}) 7 | Dequeue() interface{} 8 | Peek() interface{} 9 | PeekBack() interface{} 10 | AsSlice() []interface{} 11 | Clear() 12 | 13 | Each(consumer func(value interface{})) 14 | EachUntil(consumer func(value interface{}) bool) 15 | ReverseEachUntil(consumer func(value interface{}) bool) 16 | } 17 | -------------------------------------------------------------------------------- /k8s/kompose/k8s-app-monitor-agent-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | annotations: 5 | kompose.cmd: kompose convert -f docker-compose.yaml 6 | kompose.version: 1.10.0 () 7 | creationTimestamp: null 8 | labels: 9 | io.kompose.service: k8s-app-monitor-agent 10 | name: k8s-app-monitor-agent 11 | spec: 12 | ports: 13 | - name: "8888" 14 | port: 8888 15 | targetPort: 8888 16 | selector: 17 | io.kompose.service: k8s-app-monitor-agent 18 | status: 19 | loadBalancer: {} 20 | -------------------------------------------------------------------------------- /k8s/kompose/k8s-app-monitor-test-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | annotations: 5 | kompose.cmd: kompose convert -f docker-compose.yaml 6 | kompose.version: 1.10.0 () 7 | creationTimestamp: null 8 | labels: 9 | io.kompose.service: k8s-app-monitor-test 10 | name: k8s-app-monitor-test 11 | spec: 12 | ports: 13 | - name: "3000" 14 | port: 3000 15 | targetPort: 3000 16 | selector: 17 | io.kompose.service: k8s-app-monitor-test 18 | status: 19 | loadBalancer: {} 20 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/seq/array.go: -------------------------------------------------------------------------------- 1 | package seq 2 | 3 | // NewArray creates a new array. 4 | func NewArray(values ...float64) Array { 5 | return Array(values) 6 | } 7 | 8 | // Array is a wrapper for an array of floats that implements `ValuesProvider`. 9 | type Array []float64 10 | 11 | // Len returns the value provider length. 12 | func (a Array) Len() int { 13 | return len(a) 14 | } 15 | 16 | // GetValue returns the value at a given index. 17 | func (a Array) GetValue(index int) float64 { 18 | return a[index] 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/util/time.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "time" 4 | 5 | var ( 6 | // Time contains time utility functions. 7 | Time = timeUtil{} 8 | ) 9 | 10 | type timeUtil struct{} 11 | 12 | // TimeToFloat64 returns a float64 representation of a time. 13 | func (tu timeUtil) ToFloat64(t time.Time) float64 { 14 | return float64(t.UnixNano()) 15 | } 16 | 17 | // Float64ToTime returns a time from a float64. 18 | func (tu timeUtil) FromFloat64(tf float64) time.Time { 19 | return time.Unix(0, int64(tf)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/testdata/fixed/README: -------------------------------------------------------------------------------- 1 | These font files were copied from the Plan 9 Port's font/fixed directory. The 2 | README in that directory states that: "These fonts are converted from the BDFs 3 | in the XFree86 distribution. They were all marked as public domain." 4 | 5 | The Plan 9 Port is at https://github.com/9fans/plan9port and the copy was made 6 | from commit a78b1841 (2015-08-18). 7 | 8 | The unicode.7x13.font file also refers to a ../shinonome directory, but this 9 | testdata does not include those subfont files. 10 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/gcm_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestGCM(t *testing.T) { 10 | assert := assert.New(t) 11 | key := Crypto.CreateKey(32) 12 | plaintext := []byte("Mary Jane Hawkins") 13 | 14 | nonce, ciphertext, tag, err := GCM.Encrypt(key, plaintext) 15 | assert.Nil(err) 16 | 17 | decryptedPlaintext, err := GCM.Decrypt(key, nonce, ciphertext, tag) 18 | assert.Nil(err) 19 | assert.Equal(string(plaintext), string(decryptedPlaintext)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/helpers.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package render 4 | 5 | import ( 6 | "fmt" 7 | "html/template" 8 | ) 9 | 10 | // Included helper functions for use when rendering HTML. 11 | var helperFuncs = template.FuncMap{ 12 | "yield": func() (string, error) { 13 | return "", fmt.Errorf("yield called with no layout defined") 14 | }, 15 | "partial": func() (string, error) { 16 | return "", fmt.Errorf("block called with no layout defined") 17 | }, 18 | "current": func() (string, error) { 19 | return "", nil 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/base64.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "encoding/base64" 4 | 5 | // Base64 is a namespace singleton for (2) methods. 6 | var Base64 base64Util 7 | 8 | type base64Util struct{} 9 | 10 | // Encode returns a base64 string for a byte array. 11 | func (bu base64Util) Encode(blob []byte) string { 12 | return base64.StdEncoding.EncodeToString(blob) 13 | } 14 | 15 | // Decode returns a byte array for a base64 encoded string. 16 | func (bu base64Util) Decode(blob string) ([]byte, error) { 17 | return base64.StdEncoding.DecodeString(blob) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/grid_line_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestGenerateGridLines(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | ticks := []Tick{ 13 | {Value: 1.0, Label: "1.0"}, 14 | {Value: 2.0, Label: "2.0"}, 15 | {Value: 3.0, Label: "3.0"}, 16 | {Value: 4.0, Label: "4.0"}, 17 | } 18 | 19 | gl := GenerateGridLines(ticks, Style{}, Style{}) 20 | assert.Len(gl, 2) 21 | 22 | assert.Equal(2.0, gl[0].Value) 23 | assert.Equal(3.0, gl[1].Value) 24 | } 25 | -------------------------------------------------------------------------------- /chart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "chart.fullname" . }} 5 | labels: 6 | app: {{ template "chart.name" . }} 7 | chart: {{ template "chart.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "chart.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/glide.lock: -------------------------------------------------------------------------------- 1 | hash: afaa563af5fcfcbb3e79b27d377dc2a9bdb620d472701730e38e5e38748a85a8 2 | updated: 2017-07-18T20:19:09.577807074+08:00 3 | imports: 4 | - name: github.com/codegangsta/negroni 5 | version: aac393b02b969df303449ed8ae194a1f8f3b48d6 6 | - name: github.com/gorilla/context 7 | version: a8d44e7d8e4d532b6a27a02dd82abb31cc1b01bd 8 | - name: github.com/gorilla/mux 9 | version: 9c19ed558d5df4da88e2ade9c8940d742aef0e7e 10 | - name: github.com/unrolled/render 11 | version: 198ad4d8b8a4612176b804ca10555b222a086b40 12 | testImports: [] 13 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/seq/random_test.go: -------------------------------------------------------------------------------- 1 | package seq 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestRandomRegression(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | randomProvider := NewRandom().WithLen(4096).WithMax(256) 13 | assert.Equal(4096, randomProvider.Len()) 14 | assert.Equal(256, *randomProvider.Max()) 15 | 16 | randomSequence := New(randomProvider) 17 | randomValues := randomSequence.Array() 18 | assert.Len(randomValues, 4096) 19 | assert.InDelta(128, randomSequence.Average(), 10.0) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/helpers.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package render 4 | 5 | import ( 6 | "fmt" 7 | "html/template" 8 | ) 9 | 10 | // Included helper functions for use when rendering HTML. 11 | var helperFuncs = template.FuncMap{ 12 | "yield": func() (string, error) { 13 | return "", fmt.Errorf("yield called with no layout defined") 14 | }, 15 | "partial": func() (string, error) { 16 | return "", fmt.Errorf("block called with no layout defined") 17 | }, 18 | "current": func() (string, error) { 19 | return "", nil 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/LICENSE: -------------------------------------------------------------------------------- 1 | Use of the Freetype-Go software is subject to your choice of exactly one of 2 | the following two licenses: 3 | * The FreeType License, which is similar to the original BSD license with 4 | an advertising clause, or 5 | * The GNU General Public License (GPL), version 2 or later. 6 | 7 | The text of these licenses are available in the licenses/ftl.txt and the 8 | licenses/gpl.txt files respectively. They are also available at 9 | http://freetype.sourceforge.net/license.html 10 | 11 | The Luxi fonts in the testdata directory are licensed separately. See the 12 | testdata/COPYING file for details. 13 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/matrix/regression_test.go: -------------------------------------------------------------------------------- 1 | package matrix 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestPoly(t *testing.T) { 10 | assert := assert.New(t) 11 | var xGiven = []float64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} 12 | var yGiven = []float64{1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321} 13 | var degree = 2 14 | 15 | c, err := Poly(xGiven, yGiven, degree) 16 | assert.Nil(err) 17 | assert.Len(c, 3) 18 | 19 | assert.InDelta(c[0], 0.999999999, DefaultEpsilon) 20 | assert.InDelta(c[1], 2, DefaultEpsilon) 21 | assert.InDelta(c[2], 3, DefaultEpsilon) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/string_array_test.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/blendlabs/go-assert" 7 | "github.com/blendlabs/go-util" 8 | ) 9 | 10 | func TestStringArray(t *testing.T) { 11 | a := assert.New(t) 12 | 13 | sa := StringArray([]string{"Foo", "bar", "baz"}) 14 | a.True(sa.Contains("Foo")) 15 | a.False(sa.Contains("FOO")) 16 | a.False(sa.Contains("will")) 17 | 18 | a.True(sa.ContainsLower("foo")) 19 | a.False(sa.ContainsLower("will")) 20 | 21 | foo := sa.GetByLower("foo") 22 | a.Equal("Foo", foo) 23 | notFoo := sa.GetByLower("will") 24 | a.Equal(util.StringEmpty, notFoo) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/continuous_range_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/blendlabs/go-assert" 7 | "github.com/wcharczuk/go-chart/util" 8 | ) 9 | 10 | func TestRangeTranslate(t *testing.T) { 11 | assert := assert.New(t) 12 | values := []float64{1.0, 2.0, 2.5, 2.7, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0} 13 | r := ContinuousRange{Domain: 1000} 14 | r.Min, r.Max = util.Math.MinAndMax(values...) 15 | 16 | // delta = ~7.0 17 | // value = ~5.0 18 | // domain = ~1000 19 | // 5/8 * 1000 ~= 20 | assert.Equal(0, r.Translate(1.0)) 21 | assert.Equal(1000, r.Translate(8.0)) 22 | assert.Equal(572, r.Translate(5.0)) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/gzip_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestCompress(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | contents := []byte(String.RandomString(1024)) 13 | compressed, err := GZip.Compress(contents) 14 | assert.Nil(err) 15 | assert.NotEmpty(compressed) 16 | assert.NotEqual(string(compressed), string(contents)) 17 | 18 | assert.True(len(contents) > len(compressed)) 19 | 20 | decompressed, err := GZip.Decompress(compressed) 21 | assert.Nil(err) 22 | assert.NotEmpty(decompressed) 23 | assert.Equal(string(contents), string(decompressed)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/seq/util.go: -------------------------------------------------------------------------------- 1 | package seq 2 | 3 | import "math" 4 | 5 | func round(input float64, places int) (rounded float64) { 6 | if math.IsNaN(input) { 7 | return 0.0 8 | } 9 | 10 | sign := 1.0 11 | if input < 0 { 12 | sign = -1 13 | input *= -1 14 | } 15 | 16 | precision := math.Pow(10, float64(places)) 17 | digit := input * precision 18 | _, decimal := math.Modf(digit) 19 | 20 | if decimal >= 0.5 { 21 | rounded = math.Ceil(digit) 22 | } else { 23 | rounded = math.Floor(digit) 24 | } 25 | 26 | return rounded / precision * sign 27 | } 28 | 29 | func f64i(value float64) int { 30 | r := round(value, 0) 31 | return int(r) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/plan9font/plan9font_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package plan9font 6 | 7 | import ( 8 | "io/ioutil" 9 | "path/filepath" 10 | "testing" 11 | ) 12 | 13 | func BenchmarkParseSubfont(b *testing.B) { 14 | subfontData, err := ioutil.ReadFile(filepath.FromSlash("../testdata/fixed/7x13.0000")) 15 | if err != nil { 16 | b.Fatal(err) 17 | } 18 | b.ResetTimer() 19 | for i := 0; i < b.N; i++ { 20 | if _, err := ParseSubfont(subfontData, 0); err != nil { 21 | b.Fatal(err) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/image_writer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | 7 | "github.com/wcharczuk/go-chart" 8 | ) 9 | 10 | func main() { 11 | graph := chart.Chart{ 12 | Series: []chart.Series{ 13 | chart.ContinuousSeries{ 14 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 15 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 16 | }, 17 | }, 18 | } 19 | collector := &chart.ImageWriter{} 20 | graph.Render(chart.PNG, collector) 21 | 22 | image, err := collector.Image() 23 | if err != nil { 24 | log.Fatal(err) 25 | } 26 | fmt.Printf("Final Image: %dx%d\n", image.Bounds().Size().X, image.Bounds().Size().Y) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/time_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | assert "github.com/blendlabs/go-assert" 8 | ) 9 | 10 | func TestTimeUnixMillis(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | zero := Time.UnixMillis(time.Unix(0, 0)) 14 | assert.Zero(zero) 15 | 16 | sample := Time.UnixMillis(time.Date(2015, 03, 07, 16, 0, 0, 0, time.UTC)) 17 | assert.Equal(1425744000000, sample) 18 | } 19 | 20 | func TestTimeFromMillis(t *testing.T) { 21 | assert := assert.New(t) 22 | 23 | ts := time.Date(2015, 03, 07, 16, 0, 0, 0, time.UTC) 24 | millis := Time.UnixMillis(ts) 25 | ts2 := Time.FromMillis(millis) 26 | assert.Equal(ts, ts2) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/testdata/README: -------------------------------------------------------------------------------- 1 | The luxi*.ttf and COPYING files in this directory were copied from the X.org 2 | project, specifically 3 | http://xorg.freedesktop.org/releases/individual/font/font-bh-ttf-1.0.0.tar.bz2 4 | 5 | There are three Luxi fonts: sans (s), serif (r) and monospaced (m). For example, 6 | luxisr.ttf is Luxi Sans. The 'r' here means regular, as opposed to bold. 7 | 8 | The *.ttx files in this directory were generated from the *.ttf files 9 | by the ttx command-line tool. 10 | http://www.letterror.com/code/ttx/index.html 11 | 12 | The *-hinting.txt files in this directory were generated from the *.ttf files 13 | by the ../cmd/print-glyph-points command-line tool. 14 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/font.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/golang/freetype/truetype" 7 | "github.com/wcharczuk/go-chart/roboto" 8 | ) 9 | 10 | var ( 11 | _defaultFontLock sync.Mutex 12 | _defaultFont *truetype.Font 13 | ) 14 | 15 | // GetDefaultFont returns the default font (Roboto-Medium). 16 | func GetDefaultFont() (*truetype.Font, error) { 17 | if _defaultFont == nil { 18 | _defaultFontLock.Lock() 19 | defer _defaultFontLock.Unlock() 20 | if _defaultFont == nil { 21 | font, err := truetype.Parse(roboto.Roboto) 22 | if err != nil { 23 | return nil, err 24 | } 25 | _defaultFont = font 26 | } 27 | } 28 | return _defaultFont, nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/matrix/util.go: -------------------------------------------------------------------------------- 1 | package matrix 2 | 3 | import ( 4 | "math" 5 | "strconv" 6 | ) 7 | 8 | func minInt(values ...int) int { 9 | min := math.MaxInt32 10 | 11 | for x := 0; x < len(values); x++ { 12 | if values[x] < min { 13 | min = values[x] 14 | } 15 | } 16 | return min 17 | } 18 | 19 | func maxInt(values ...int) int { 20 | max := math.MinInt32 21 | 22 | for x := 0; x < len(values); x++ { 23 | if values[x] > max { 24 | max = values[x] 25 | } 26 | } 27 | return max 28 | } 29 | 30 | func f64s(v float64) string { 31 | return strconv.FormatFloat(v, 'f', -1, 64) 32 | } 33 | 34 | func roundToEpsilon(value, epsilon float64) float64 { 35 | return math.Nextafter(value, value) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/legend_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | 7 | "github.com/blendlabs/go-assert" 8 | ) 9 | 10 | func TestLegend(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | graph := Chart{ 14 | Series: []Series{ 15 | ContinuousSeries{ 16 | Name: "A test series", 17 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 18 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 19 | }, 20 | }, 21 | } 22 | 23 | //note we have to do this as a separate step because we need a reference to graph 24 | graph.Elements = []Renderable{ 25 | Legend(&graph), 26 | } 27 | buf := bytes.NewBuffer([]byte{}) 28 | err := graph.Render(PNG, buf) 29 | assert.Nil(err) 30 | assert.NotZero(buf.Len()) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/curve_test.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | type point struct { 10 | X, Y float64 11 | } 12 | 13 | type mockLine struct { 14 | inner []point 15 | } 16 | 17 | func (ml *mockLine) LineTo(x, y float64) { 18 | ml.inner = append(ml.inner, point{x, y}) 19 | } 20 | 21 | func (ml mockLine) Len() int { 22 | return len(ml.inner) 23 | } 24 | 25 | func TestTraceQuad(t *testing.T) { 26 | assert := assert.New(t) 27 | 28 | // Quad 29 | // x1, y1, cpx1, cpy2, x2, y2 float64 30 | // do the 9->12 circle segment 31 | quad := []float64{10, 20, 20, 20, 20, 10} 32 | liner := &mockLine{} 33 | TraceQuad(liner, quad, 0.5) 34 | assert.NotZero(liner.Len()) 35 | } 36 | -------------------------------------------------------------------------------- /k8s/kompose/k8s-app-monitor-test-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | annotations: 5 | kompose.cmd: kompose convert -f docker-compose.yaml 6 | kompose.version: 1.10.0 () 7 | creationTimestamp: null 8 | labels: 9 | io.kompose.service: k8s-app-monitor-test 10 | name: k8s-app-monitor-test 11 | spec: 12 | replicas: 1 13 | strategy: {} 14 | template: 15 | metadata: 16 | creationTimestamp: null 17 | labels: 18 | io.kompose.service: k8s-app-monitor-test 19 | spec: 20 | containers: 21 | - image: jimmysong/k8s-app-monitor-test:9c935dd 22 | name: monitor-test 23 | ports: 24 | - containerPort: 3000 25 | resources: {} 26 | restartPolicy: Always 27 | status: {} 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/vector/acc_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64 appengine !gc !go1.6 noasm 6 | 7 | package vector 8 | 9 | const haveFixedAccumulateSIMD = false 10 | const haveFloatingAccumulateSIMD = false 11 | 12 | func fixedAccumulateOpOverSIMD(dst []uint8, src []uint32) {} 13 | func fixedAccumulateOpSrcSIMD(dst []uint8, src []uint32) {} 14 | func fixedAccumulateMaskSIMD(buf []uint32) {} 15 | func floatingAccumulateOpOverSIMD(dst []uint8, src []float32) {} 16 | func floatingAccumulateOpSrcSIMD(dst []uint8, src []float32) {} 17 | func floatingAccumulateMaskSIMD(dst []uint32, src []float32) {} 18 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/polynomial_regression_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | "github.com/wcharczuk/go-chart/matrix" 8 | ) 9 | 10 | func TestPolynomialRegression(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | var xv []float64 14 | var yv []float64 15 | 16 | for i := 0; i < 100; i++ { 17 | xv = append(xv, float64(i)) 18 | yv = append(yv, float64(i*i)) 19 | } 20 | 21 | values := ContinuousSeries{ 22 | XValues: xv, 23 | YValues: yv, 24 | } 25 | 26 | poly := &PolynomialRegressionSeries{ 27 | InnerSeries: values, 28 | Degree: 2, 29 | } 30 | 31 | for i := 0; i < 100; i++ { 32 | _, y := poly.GetValues(i) 33 | assert.InDelta(float64(i*i), y, matrix.DefaultEpsilon) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/crypto_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestCryptoEncryptDecrypt(t *testing.T) { 10 | assert := assert.New(t) 11 | key := Crypto.CreateKey(32) 12 | plaintext := "Mary Jane Hawkins" 13 | 14 | ciphertext, err := Crypto.Encrypt(key, []byte(plaintext)) 15 | assert.Nil(err) 16 | 17 | decryptedPlaintext, err := Crypto.Decrypt(key, ciphertext) 18 | assert.Nil(err) 19 | assert.Equal(plaintext, string(decryptedPlaintext)) 20 | } 21 | 22 | func TestCryptoHash(t *testing.T) { 23 | assert := assert.New(t) 24 | key := Crypto.CreateKey(128) 25 | plaintext := "123-12-1234" 26 | assert.Equal( 27 | Crypto.Hash(key, []byte(plaintext)), 28 | Crypto.Hash(key, []byte(plaintext)), 29 | ) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/logger_test.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func Test_Logger(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | l := NewLogger() 16 | l.Logger = log.New(buff, "[negroni] ", 0) 17 | 18 | n := New() 19 | // replace log for testing 20 | n.Use(l) 21 | n.UseHandler(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { 22 | rw.WriteHeader(http.StatusNotFound) 23 | })) 24 | 25 | req, err := http.NewRequest("GET", "http://localhost:3000/foobar", nil) 26 | if err != nil { 27 | t.Error(err) 28 | } 29 | 30 | n.ServeHTTP(recorder, req) 31 | expect(t, recorder.Code, http.StatusNotFound) 32 | refute(t, len(buff.String()), 0) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Freetype-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | # 5 | # Freetype-Go is derived from Freetype, which is written in C. The latter 6 | # is copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg. 7 | 8 | # Names should be added to this file as 9 | # Name or Organization 10 | # The email address is not required for organizations. 11 | 12 | # Please keep the list sorted. 13 | 14 | Google Inc. 15 | Jeff R. Allen 16 | Maksim Kochkin 17 | Michael Fogleman 18 | Rémy Oudompheng 19 | Roger Peppe 20 | Steven Edwards 21 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/histogram_series_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | "github.com/wcharczuk/go-chart/seq" 8 | ) 9 | 10 | func TestHistogramSeries(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | cs := ContinuousSeries{ 14 | Name: "Test Series", 15 | XValues: seq.Range(1.0, 20.0), 16 | YValues: seq.Range(10.0, -10.0), 17 | } 18 | 19 | hs := HistogramSeries{ 20 | InnerSeries: cs, 21 | } 22 | 23 | for x := 0; x < hs.Len(); x++ { 24 | csx, csy := cs.GetValues(0) 25 | hsx, hsy1, hsy2 := hs.GetBoundedValues(0) 26 | assert.Equal(csx, hsx) 27 | assert.True(hsy1 > 0) 28 | assert.True(hsy2 <= 0) 29 | assert.True(csy < 0 || (csy > 0 && csy == hsy1)) 30 | assert.True(csy > 0 || (csy < 0 && csy == hsy2)) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/manifest.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: k8s-app-monitor-test 5 | namespace: default 6 | spec: 7 | replicas: 1 8 | template: 9 | metadata: 10 | labels: 11 | k8s-app: k8s-app-monitor-test 12 | spec: 13 | containers: 14 | - image: jimmysong/k8s-app-monitor-test:latest 15 | name : app 16 | ports: 17 | - containerPort: 3000 18 | env: 19 | - name: APP_PORT 20 | value: 3000 21 | --- 22 | apiVersion: v1 23 | kind: Service 24 | metadata: 25 | name: k8s-app-monitor-test 26 | labels: 27 | k8s-svc: k8s-app-monitor-test 28 | spec: 29 | ports: 30 | - port: 3000 31 | protocol: TCP 32 | name: http 33 | selector: 34 | k8s-app: k8s-app-monitor-test 35 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/helpers_pre16.go: -------------------------------------------------------------------------------- 1 | // +build !go1.6 2 | 3 | package render 4 | 5 | import ( 6 | "fmt" 7 | "html/template" 8 | ) 9 | 10 | // Included helper functions for use when rendering HTML. 11 | var helperFuncs = template.FuncMap{ 12 | "yield": func() (string, error) { 13 | return "", fmt.Errorf("yield called with no layout defined") 14 | }, 15 | // `block` is deprecated! Use the `partial` below if you need this functionality still. 16 | // Otherwise, checkout Go's `block` implementation introduced in 1.6 17 | "block": func() (string, error) { 18 | return "", fmt.Errorf("block called with no layout defined") 19 | }, 20 | "partial": func() (string, error) { 21 | return "", fmt.Errorf("block called with no layout defined") 22 | }, 23 | "current": func() (string, error) { 24 | return "", nil 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/doc.go: -------------------------------------------------------------------------------- 1 | // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. 2 | // 3 | // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. 4 | // 5 | // For a full guide visit http://github.com/codegangsta/negroni 6 | // 7 | // package main 8 | // 9 | // import ( 10 | // "github.com/codegangsta/negroni" 11 | // "net/http" 12 | // "fmt" 13 | // ) 14 | // 15 | // func main() { 16 | // mux := http.NewServeMux() 17 | // mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 18 | // fmt.Fprintf(w, "Welcome to the home page!") 19 | // }) 20 | // 21 | // n := negroni.Classic() 22 | // n.UseHandler(mux) 23 | // n.Run(":3000") 24 | // } 25 | package negroni 26 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/boolean_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/blendlabs/go-assert" 8 | ) 9 | 10 | func TestUnmarshalJSON(t *testing.T) { 11 | assert := assert.New(t) 12 | valid := []string{"1", "0", "true", "false", "True", "False", `"true"`, `"false"`} 13 | notValid := []string{"foo", "123", "-1", "3.14", "", `""`} 14 | 15 | for index, value := range valid { 16 | var bit Boolean 17 | jsonErr := bit.UnmarshalJSON([]byte(value)) 18 | assert.Nil(jsonErr) 19 | 20 | if index%2 == 0 { 21 | assert.True(bit.AsBool(), fmt.Sprintf("%s => %#v\n", value, bit)) 22 | } else { 23 | assert.False(bit.AsBool()) 24 | } 25 | } 26 | 27 | for _, value := range notValid { 28 | var bit Boolean 29 | jsonErr := bit.UnmarshalJSON([]byte(value)) 30 | assert.NotNil(jsonErr) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/logger.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | "time" 8 | ) 9 | 10 | // Logger is a middleware handler that logs the request as it goes in and the response as it goes out. 11 | type Logger struct { 12 | // Logger inherits from log.Logger used to log messages with the Logger middleware 13 | *log.Logger 14 | } 15 | 16 | // NewLogger returns a new Logger instance 17 | func NewLogger() *Logger { 18 | return &Logger{log.New(os.Stdout, "[negroni] ", 0)} 19 | } 20 | 21 | func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 22 | start := time.Now() 23 | l.Printf("Started %s %s", r.Method, r.URL.Path) 24 | 25 | next(rw, r) 26 | 27 | res := rw.(ResponseWriter) 28 | l.Printf("Completed %v %s in %v", res.Status(), http.StatusText(res.Status()), time.Since(start)) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/codegangsta/negroni/logger_test.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func Test_Logger(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | l := NewLogger() 16 | l.Logger = log.New(buff, "[negroni] ", 0) 17 | 18 | n := New() 19 | // replace log for testing 20 | n.Use(l) 21 | n.UseHandler(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { 22 | rw.WriteHeader(http.StatusNotFound) 23 | })) 24 | 25 | req, err := http.NewRequest("GET", "http://localhost:3000/foobar", nil) 26 | if err != nil { 27 | t.Error(err) 28 | } 29 | 30 | n.ServeHTTP(recorder, req) 31 | expect(t, recorder.Code, http.StatusNotFound) 32 | refute(t, len(buff.String()), 0) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/helpers_pre16.go: -------------------------------------------------------------------------------- 1 | // +build !go1.6 2 | 3 | package render 4 | 5 | import ( 6 | "fmt" 7 | "html/template" 8 | ) 9 | 10 | // Included helper functions for use when rendering HTML. 11 | var helperFuncs = template.FuncMap{ 12 | "yield": func() (string, error) { 13 | return "", fmt.Errorf("yield called with no layout defined") 14 | }, 15 | // `block` is deprecated! Use the `partial` below if you need this functionality still. 16 | // Otherwise, checkout Go's `block` implementation introduced in 1.6 17 | "block": func() (string, error) { 18 | return "", fmt.Errorf("block called with no layout defined") 19 | }, 20 | "partial": func() (string, error) { 21 | return "", fmt.Errorf("block called with no layout defined") 22 | }, 23 | "current": func() (string, error) { 24 | return "", nil 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /k8s/kompose/k8s-app-monitor-agent-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | annotations: 5 | kompose.cmd: kompose convert -f docker-compose.yaml 6 | kompose.version: 1.10.0 () 7 | creationTimestamp: null 8 | labels: 9 | io.kompose.service: k8s-app-monitor-agent 10 | name: k8s-app-monitor-agent 11 | spec: 12 | replicas: 1 13 | strategy: {} 14 | template: 15 | metadata: 16 | creationTimestamp: null 17 | labels: 18 | io.kompose.service: k8s-app-monitor-agent 19 | spec: 20 | containers: 21 | - env: 22 | - name: SERVICE_NAME 23 | value: k8s-app-monitor-test 24 | image: jimmysong/k8s-app-monitor-agent:749f547 25 | name: monitor-agent 26 | ports: 27 | - containerPort: 8888 28 | resources: {} 29 | restartPolicy: Always 30 | status: {} 31 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/rate_limiter_test.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | "github.com/blendlabs/go-assert" 8 | ) 9 | 10 | func TestRateLimiter(t *testing.T) { 11 | it := assert.New(t) 12 | 13 | rl := NewRateLimiter(5, 1*time.Millisecond) 14 | 15 | it.False(rl.Check("a")) 16 | it.False(rl.Check("b")) 17 | it.False(rl.Check("b")) 18 | it.False(rl.Check("b")) 19 | it.False(rl.Check("b")) 20 | it.False(rl.Check("a")) 21 | it.False(rl.Check("a")) 22 | it.False(rl.Check("a")) 23 | it.True(rl.Check("a")) 24 | 25 | time.Sleep(1 * time.Millisecond) 26 | 27 | it.False(rl.Check("a")) 28 | it.False(rl.Check("b")) 29 | it.False(rl.Check("b")) 30 | it.False(rl.Check("b")) 31 | it.False(rl.Check("b")) 32 | it.False(rl.Check("a")) 33 | it.False(rl.Check("a")) 34 | it.False(rl.Check("a")) 35 | it.True(rl.Check("a")) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/codegangsta/negroni/doc.go: -------------------------------------------------------------------------------- 1 | // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. 2 | // 3 | // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. 4 | // 5 | // For a full guide visit http://github.com/codegangsta/negroni 6 | // 7 | // package main 8 | // 9 | // import ( 10 | // "github.com/codegangsta/negroni" 11 | // "net/http" 12 | // "fmt" 13 | // ) 14 | // 15 | // func main() { 16 | // mux := http.NewServeMux() 17 | // mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 18 | // fmt.Fprintf(w, "Welcome to the home page!") 19 | // }) 20 | // 21 | // n := negroni.Classic() 22 | // n.UseHandler(mux) 23 | // n.Run(":3000") 24 | // } 25 | package negroni 26 | -------------------------------------------------------------------------------- /wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | 3 | build: 4 | 5 | steps: 6 | - setup-go-workspace 7 | 8 | - script: 9 | name: go get 10 | code: | 11 | cd $WERCKER_SOURCE_DIR 12 | go version 13 | go get -u github.com/Masterminds/glide 14 | export PATH=$WERCKER_SOURCE_DIR/bin:$PATH 15 | glide install 16 | 17 | # Build the project 18 | - script: 19 | name: go build 20 | code: | 21 | go build 22 | 23 | - script: 24 | name: copy files to wercker output 25 | code: | 26 | cp -R ./ ${WERCKER_OUTPUT_DIR} 27 | 28 | deploy: 29 | steps: 30 | - internal/docker-push: 31 | username: $USERNAME 32 | password: $PASSWORD 33 | cmd: /pipeline/source/k8s-app-monitor-agent 34 | port: "3000" 35 | tag: latest 36 | repository: jimmysong/k8s-app-monitor-agent 37 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/pie_chart/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | 8 | "github.com/wcharczuk/go-chart" 9 | ) 10 | 11 | func drawChart(res http.ResponseWriter, req *http.Request) { 12 | pie := chart.PieChart{ 13 | Width: 512, 14 | Height: 512, 15 | Values: []chart.Value{ 16 | {Value: 5, Label: "Blue"}, 17 | {Value: 5, Label: "Green"}, 18 | {Value: 4, Label: "Gray"}, 19 | {Value: 4, Label: "Orange"}, 20 | {Value: 3, Label: "Deep Blue"}, 21 | {Value: 3, Label: "??"}, 22 | {Value: 1, Label: "!!"}, 23 | }, 24 | } 25 | 26 | res.Header().Set("Content-Type", "image/png") 27 | err := pie.Render(chart.PNG, res) 28 | if err != nil { 29 | fmt.Printf("Error rendering pie chart: %v\n", err) 30 | } 31 | } 32 | 33 | func main() { 34 | http.HandleFunc("/", drawChart) 35 | log.Fatal(http.ListenAndServe(":8080", nil)) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/codegangsta/negroni/logger.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | "time" 8 | ) 9 | 10 | // Logger is a middleware handler that logs the request as it goes in and the response as it goes out. 11 | type Logger struct { 12 | // Logger inherits from log.Logger used to log messages with the Logger middleware 13 | *log.Logger 14 | } 15 | 16 | // NewLogger returns a new Logger instance 17 | func NewLogger() *Logger { 18 | return &Logger{log.New(os.Stdout, "[negroni] ", 0)} 19 | } 20 | 21 | func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 22 | start := time.Now() 23 | l.Printf("Started %s %s", r.Method, r.URL.Path) 24 | 25 | next(rw, r) 26 | 27 | res := rw.(ResponseWriter) 28 | l.Printf("Completed %v %s in %v", res.Status(), http.StatusText(res.Status()), time.Since(start)) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/jet.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import "github.com/wcharczuk/go-chart/drawing" 4 | 5 | // Jet is a color map provider based on matlab's jet color map. 6 | func Jet(v, vmin, vmax float64) drawing.Color { 7 | c := drawing.Color{R: 0xff, G: 0xff, B: 0xff, A: 0xff} // white 8 | var dv float64 9 | 10 | if v < vmin { 11 | v = vmin 12 | } 13 | if v > vmax { 14 | v = vmax 15 | } 16 | dv = vmax - vmin 17 | 18 | if v < (vmin + 0.25*dv) { 19 | c.R = 0 20 | c.G = drawing.ColorChannelFromFloat(4 * (v - vmin) / dv) 21 | } else if v < (vmin + 0.5*dv) { 22 | c.R = 0 23 | c.B = drawing.ColorChannelFromFloat(1 + 4*(vmin+0.25*dv-v)/dv) 24 | } else if v < (vmin + 0.75*dv) { 25 | c.R = drawing.ColorChannelFromFloat(4 * (v - vmin - 0.5*dv) / dv) 26 | c.B = 0 27 | } else { 28 | c.G = drawing.ColorChannelFromFloat(1 + 4*(vmin+0.75*dv-v)/dv) 29 | c.B = 0 30 | } 31 | 32 | return c 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | 3 | build: 4 | 5 | steps: 6 | - setup-go-workspace 7 | 8 | - script: 9 | name: go get 10 | code: | 11 | cd $WERCKER_SOURCE_DIR 12 | go version 13 | go get -u github.com/Masterminds/glide 14 | export PATH=$WERCKER_SOURCE_DIR/bin:$PATH 15 | glide install 16 | 17 | # Build the project 18 | - script: 19 | name: go build 20 | code: | 21 | go build 22 | 23 | - script: 24 | name: copy files to wercker output 25 | code: | 26 | cp -R ./ ${WERCKER_OUTPUT_DIR} 27 | 28 | deploy: 29 | steps: 30 | - internal/docker-push: 31 | username: $USERNAME 32 | password: $PASSWORD 33 | cmd: /pipeline/source/k8s-app-monitor-test 34 | port: "3000" 35 | tag: latest 36 | repository: jimmysong/k8s-app-monitor-test 37 | -------------------------------------------------------------------------------- /manifest.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: k8s-app-monitor-agent 5 | namespace: default 6 | spec: 7 | replicas: 1 8 | template: 9 | metadata: 10 | labels: 11 | k8s-app: k8s-app-monitor-agent 12 | spec: 13 | containers: 14 | - image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-app-monitor-agent:latest 15 | imagePullPolicy: Always 16 | name: app 17 | ports: 18 | - containerPort: 8888 19 | env: 20 | - name: APP_PORT 21 | value: "3000" 22 | - name: SERVICE_NAME 23 | value: "k8s-app-monitor-test" 24 | --- 25 | apiVersion: v1 26 | kind: Service 27 | metadata: 28 | name: k8s-app-monitor-agent 29 | labels: 30 | k8s-svc: k8s-app-monitor-agent 31 | spec: 32 | ports: 33 | - port: 8888 34 | protocol: TCP 35 | name: http 36 | selector: 37 | k8s-app: k8s-app-monitor-agent 38 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | **ATTN**: This project uses [semantic versioning](http://semver.org/). 4 | 5 | ## [Unreleased] 6 | 7 | ## [0.2.0] - 2016-05-10 8 | ### Added 9 | - Support for variadic handlers in `New()` 10 | - Added `Negroni.Handlers()` to fetch all of the handlers for a given chain 11 | - Allowed size in `Recovery` handler was bumped to 8k 12 | - `Negroni.UseFunc` to push another handler onto the chain 13 | 14 | ### Changed 15 | - Set the status before calling `beforeFuncs` so the information is available to them 16 | - Set default status to `200` in the case that no handler writes status -- was previously `0` 17 | - Panic if `nil` handler is given to `negroni.Use` 18 | 19 | ## 0.1.0 - 2013-07-22 20 | ### Added 21 | - Initial implementation. 22 | 23 | [Unreleased]: https://github.com/codegangsta/negroni/compare/v0.2.0...HEAD 24 | [0.2.0]: https://github.com/codegangsta/negroni/compare/v0.1.0...v0.2.0 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/tiff/buffer_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package tiff 6 | 7 | import ( 8 | "io" 9 | "strings" 10 | "testing" 11 | ) 12 | 13 | var readAtTests = []struct { 14 | n int 15 | off int64 16 | s string 17 | err error 18 | }{ 19 | {2, 0, "ab", nil}, 20 | {6, 0, "abcdef", nil}, 21 | {3, 3, "def", nil}, 22 | {3, 5, "f", io.EOF}, 23 | {3, 6, "", io.EOF}, 24 | } 25 | 26 | func TestReadAt(t *testing.T) { 27 | r := newReaderAt(strings.NewReader("abcdef")) 28 | b := make([]byte, 10) 29 | for _, test := range readAtTests { 30 | n, err := r.ReadAt(b[:test.n], test.off) 31 | s := string(b[:n]) 32 | if s != test.s || err != test.err { 33 | t.Errorf("buffer.ReadAt(<%v bytes>, %v): got %v, %q; want %v, %q", test.n, test.off, err, s, test.err, test.s) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/vector/acc_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | // +build gc 7 | // +build go1.6 8 | // +build !noasm 9 | 10 | package vector 11 | 12 | func haveSSE4_1() bool 13 | 14 | var haveFixedAccumulateSIMD = haveSSE4_1() 15 | 16 | const haveFloatingAccumulateSIMD = true 17 | 18 | //go:noescape 19 | func fixedAccumulateOpOverSIMD(dst []uint8, src []uint32) 20 | 21 | //go:noescape 22 | func fixedAccumulateOpSrcSIMD(dst []uint8, src []uint32) 23 | 24 | //go:noescape 25 | func fixedAccumulateMaskSIMD(buf []uint32) 26 | 27 | //go:noescape 28 | func floatingAccumulateOpOverSIMD(dst []uint8, src []float32) 29 | 30 | //go:noescape 31 | func floatingAccumulateOpSrcSIMD(dst []uint8, src []float32) 32 | 33 | //go:noescape 34 | func floatingAccumulateMaskSIMD(dst []uint32, src []float32) 35 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/range.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // NameProvider is a type that returns a name. 4 | type NameProvider interface { 5 | GetName() string 6 | } 7 | 8 | // StyleProvider is a type that returns a style. 9 | type StyleProvider interface { 10 | GetStyle() Style 11 | } 12 | 13 | // IsZeroable is a type that returns if it's been set or not. 14 | type IsZeroable interface { 15 | IsZero() bool 16 | } 17 | 18 | // Stringable is a type that has a string representation. 19 | type Stringable interface { 20 | String() string 21 | } 22 | 23 | // Range is a common interface for a range of values. 24 | type Range interface { 25 | Stringable 26 | IsZeroable 27 | 28 | GetMin() float64 29 | SetMin(min float64) 30 | 31 | GetMax() float64 32 | SetMax(max float64) 33 | 34 | GetDelta() float64 35 | 36 | GetDomain() int 37 | SetDomain(domain int) 38 | 39 | IsDescending() bool 40 | 41 | // Translate the range to the domain. 42 | Translate(value float64) int 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/concat_series_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | "github.com/wcharczuk/go-chart/seq" 8 | ) 9 | 10 | func TestConcatSeries(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | s1 := ContinuousSeries{ 14 | XValues: seq.Range(1.0, 10.0), 15 | YValues: seq.Range(1.0, 10.0), 16 | } 17 | 18 | s2 := ContinuousSeries{ 19 | XValues: seq.Range(11, 20.0), 20 | YValues: seq.Range(10.0, 1.0), 21 | } 22 | 23 | s3 := ContinuousSeries{ 24 | XValues: seq.Range(21, 30.0), 25 | YValues: seq.Range(1.0, 10.0), 26 | } 27 | 28 | cs := ConcatSeries([]Series{s1, s2, s3}) 29 | assert.Equal(30, cs.Len()) 30 | 31 | x0, y0 := cs.GetValue(0) 32 | assert.Equal(1.0, x0) 33 | assert.Equal(1.0, y0) 34 | 35 | xm, ym := cs.GetValue(19) 36 | assert.Equal(20.0, xm) 37 | assert.Equal(1.0, ym) 38 | 39 | xn, yn := cs.GetValue(29) 40 | assert.Equal(30.0, xn) 41 | assert.Equal(10.0, yn) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/codegangsta/negroni/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | **ATTN**: This project uses [semantic versioning](http://semver.org/). 4 | 5 | ## [Unreleased] 6 | 7 | ## [0.2.0] - 2016-05-10 8 | ### Added 9 | - Support for variadic handlers in `New()` 10 | - Added `Negroni.Handlers()` to fetch all of the handlers for a given chain 11 | - Allowed size in `Recovery` handler was bumped to 8k 12 | - `Negroni.UseFunc` to push another handler onto the chain 13 | 14 | ### Changed 15 | - Set the status before calling `beforeFuncs` so the information is available to them 16 | - Set default status to `200` in the case that no handler writes status -- was previously `0` 17 | - Panic if `nil` handler is given to `negroni.Use` 18 | 19 | ## 0.1.0 - 2013-07-22 20 | ### Added 21 | - Initial implementation. 22 | 23 | [Unreleased]: https://github.com/codegangsta/negroni/compare/v0.2.0...HEAD 24 | [0.2.0]: https://github.com/codegangsta/negroni/compare/v0.1.0...v0.2.0 25 | -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/README: -------------------------------------------------------------------------------- 1 | The Freetype font rasterizer in the Go programming language. 2 | 3 | To download and install from source: 4 | $ go get github.com/golang/freetype 5 | 6 | It is an incomplete port: 7 | * It only supports TrueType fonts, and not Type 1 fonts nor bitmap fonts. 8 | * It only supports the Unicode encoding. 9 | 10 | There are also some implementation differences: 11 | * It uses a 26.6 fixed point co-ordinate system everywhere internally, 12 | as opposed to the original Freetype's mix of 26.6 (or 10.6 for 16-bit 13 | systems) in some places, and 24.8 in the "smooth" rasterizer. 14 | 15 | Freetype-Go is derived from Freetype, which is written in C. Freetype is 16 | copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg. 17 | Freetype-Go is copyright The Freetype-Go Authors, who are listed in the 18 | AUTHORS file. 19 | 20 | Unless otherwise noted, the Freetype-Go source files are distributed 21 | under the BSD-style license found in the LICENSE file. 22 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/painter.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | import ( 4 | "image" 5 | "image/color" 6 | 7 | "golang.org/x/image/draw" 8 | "golang.org/x/image/math/f64" 9 | 10 | "github.com/golang/freetype/raster" 11 | ) 12 | 13 | // Painter implements the freetype raster.Painter and has a SetColor method like the RGBAPainter 14 | type Painter interface { 15 | raster.Painter 16 | SetColor(color color.Color) 17 | } 18 | 19 | // DrawImage draws an image into dest using an affine transformation matrix, an op and a filter 20 | func DrawImage(src image.Image, dest draw.Image, tr Matrix, op draw.Op, filter ImageFilter) { 21 | var transformer draw.Transformer 22 | switch filter { 23 | case LinearFilter: 24 | transformer = draw.NearestNeighbor 25 | case BilinearFilter: 26 | transformer = draw.BiLinear 27 | case BicubicFilter: 28 | transformer = draw.CatmullRom 29 | } 30 | transformer.Transform(dest, f64.Aff3{tr[0], tr[1], tr[4], tr[2], tr[3], tr[5]}, src, src.Bounds(), op, nil) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/free_type_path.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | import ( 4 | "github.com/golang/freetype/raster" 5 | "golang.org/x/image/math/fixed" 6 | ) 7 | 8 | // FtLineBuilder is a builder for freetype raster glyphs. 9 | type FtLineBuilder struct { 10 | Adder raster.Adder 11 | } 12 | 13 | // MoveTo implements the path builder interface. 14 | func (liner FtLineBuilder) MoveTo(x, y float64) { 15 | liner.Adder.Start(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)}) 16 | } 17 | 18 | // LineTo implements the path builder interface. 19 | func (liner FtLineBuilder) LineTo(x, y float64) { 20 | liner.Adder.Add1(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)}) 21 | } 22 | 23 | // LineJoin implements the path builder interface. 24 | func (liner FtLineBuilder) LineJoin() {} 25 | 26 | // Close implements the path builder interface. 27 | func (liner FtLineBuilder) Close() {} 28 | 29 | // End implements the path builder interface. 30 | func (liner FtLineBuilder) End() {} 31 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/line.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | import ( 4 | "image/color" 5 | "image/draw" 6 | ) 7 | 8 | // PolylineBresenham draws a polyline to an image 9 | func PolylineBresenham(img draw.Image, c color.Color, s ...float64) { 10 | for i := 2; i < len(s); i += 2 { 11 | Bresenham(img, c, int(s[i-2]+0.5), int(s[i-1]+0.5), int(s[i]+0.5), int(s[i+1]+0.5)) 12 | } 13 | } 14 | 15 | // Bresenham draws a line between (x0, y0) and (x1, y1) 16 | func Bresenham(img draw.Image, color color.Color, x0, y0, x1, y1 int) { 17 | dx := abs(x1 - x0) 18 | dy := abs(y1 - y0) 19 | var sx, sy int 20 | if x0 < x1 { 21 | sx = 1 22 | } else { 23 | sx = -1 24 | } 25 | if y0 < y1 { 26 | sy = 1 27 | } else { 28 | sy = -1 29 | } 30 | err := dx - dy 31 | 32 | var e2 int 33 | for { 34 | img.Set(x0, y0, color) 35 | if x0 == x1 && y0 == y1 { 36 | return 37 | } 38 | e2 = 2 * err 39 | if e2 > -dy { 40 | err = err - dy 41 | x0 = x0 + sx 42 | } 43 | if e2 < dx { 44 | err = err + dx 45 | y0 = y0 + sy 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/gzip.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bytes" 5 | "compress/gzip" 6 | "io/ioutil" 7 | 8 | exception "github.com/blendlabs/go-exception" 9 | ) 10 | 11 | var ( 12 | // GZip is a namespace for gzip utilities. 13 | GZip = gzipUtil{} 14 | ) 15 | 16 | type gzipUtil struct{} 17 | 18 | // Compress gzip compresses the bytes. 19 | func (gu gzipUtil) Compress(contents []byte) ([]byte, error) { 20 | var b bytes.Buffer 21 | w := gzip.NewWriter(&b) 22 | w.Write(contents) 23 | err := w.Flush() 24 | if err != nil { 25 | return nil, exception.Wrap(err) 26 | } 27 | err = w.Close() 28 | if err != nil { 29 | return nil, exception.Wrap(err) 30 | } 31 | 32 | return b.Bytes(), nil 33 | } 34 | 35 | // Decompress gzip decompresses the bytes. 36 | func (gu gzipUtil) Decompress(contents []byte) ([]byte, error) { 37 | r, err := gzip.NewReader(bytes.NewBuffer(contents)) 38 | if err != nil { 39 | return nil, exception.Wrap(err) 40 | } 41 | defer r.Close() 42 | decompressed, err := ioutil.ReadAll(r) 43 | return decompressed, exception.Wrap(err) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | notifications: 5 | slack: 6 | rooms: 7 | secure: "alg1esJzb3RDccdglWf0FnPY6xNFYdRInhVnU2HPHnmH2wX1EC7R3skAkVs0Up59QCa98qduTSw4kvqjVWuXK5tNTDfdy/odaSH2Q1+bVCDKptaeUUs5XnObTmertwxgOuoO+3XhoyRc/b8tzFh8heqCzzXLpjQPuM5Wal0hbl5bxJW7GxwoEYqN8TqFEtQtGTcUtkruuTXkfvpJL88hUxT1cOJ44on/n8e25hFUrMKG0KE+GP4geqhqGPw7IIxx3mminOdFwwtftkGa8W+rMsl2RG1piT5rcXWQkU3+ABw7nEvg3MvRWjR/kHYbh57xrJJaTK3cLfiU3yBdd4Ayuq2uMDLNlb/U2uoHs6wsitsswA8ageOtq/NGVeWonUy/AuNpJpnC0WqzBxRTeXfBUwUWQ2tih9jzFxW5Z9E2pPDoZOJ6032+9uefT1KkYJoCUuGK1wP1DJ5TsN+JDsA5xO9msIPg52VxRlt2MJxwy25rEIZanqjY1pD2dK4uh2dVytsUK3DfVLoh7gV9HeP50btPFQC9fFQIeoiAo+4Jo1/klw3OhbsXeXbT4Z0HvcbNy7QnH254HRSe686wrcUBG51MBWdSeurwHTOhg+aTLBWw8ok23LFWI7kW2EMckCsOIHjUp1btKYgXQlSkB+ZuPWWWOjJiVuqL9WKpLgK/aII=" 8 | on_success: always 9 | on_failure: always 10 | template: 11 | - "%{repository_slug} %{message} %{duration}" 12 | - "%{author} : (<%{compare_url}|%{commit}>) %{commit_message}" 13 | - "Build Details: %{build_url}" 14 | 15 | script: 16 | - go test ./... 17 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/bitflag.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | var ( 4 | // BitFlag is a namespace for bitflag functions. 5 | BitFlag = bitFlag{} 6 | ) 7 | 8 | type bitFlag struct{} 9 | 10 | // All returns if all the reference bits are set for a given value 11 | func (bf bitFlag) All(reference, value uint64) bool { 12 | return reference&value == value 13 | } 14 | 15 | // Any returns if any the reference bits are set for a given value 16 | func (bf bitFlag) Any(reference, value uint64) bool { 17 | return reference&value > 0 18 | } 19 | 20 | // Zero makes a given flag zero'd in the set. 21 | func (bf bitFlag) Zero(flagSet, value uint64) uint64 { 22 | return flagSet ^ ((-(0) ^ value) & flagSet) 23 | } 24 | 25 | // Set sets a flag value to 1. 26 | func (bf bitFlag) Set(flagSet, value uint64) uint64 { 27 | return flagSet | value 28 | } 29 | 30 | // Combine combines all the values into one flag. 31 | func (bf bitFlag) Combine(values ...uint64) uint64 { 32 | var outputFlag uint64 33 | for _, value := range values { 34 | outputFlag = outputFlag | value 35 | } 36 | return outputFlag 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_ranges/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | ) 8 | 9 | func drawChart(res http.ResponseWriter, req *http.Request) { 10 | /* 11 | In this example we set a custom range for the y-axis, overriding the automatic range generation. 12 | Note: the chart will still generate the ticks automatically based on the custom range, so the intervals may be a bit weird. 13 | */ 14 | 15 | graph := chart.Chart{ 16 | YAxis: chart.YAxis{ 17 | Style: chart.Style{ 18 | Show: true, 19 | }, 20 | Range: &chart.ContinuousRange{ 21 | Min: 0.0, 22 | Max: 10.0, 23 | }, 24 | }, 25 | Series: []chart.Series{ 26 | chart.ContinuousSeries{ 27 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 28 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 29 | }, 30 | }, 31 | } 32 | 33 | res.Header().Set("Content-Type", "image/png") 34 | graph.Render(chart.PNG, res) 35 | } 36 | 37 | func main() { 38 | http.HandleFunc("/", drawChart) 39 | http.ListenAndServe(":8080", nil) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/service/server.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/codegangsta/negroni" 7 | "github.com/gorilla/mux" 8 | "github.com/unrolled/render" 9 | ) 10 | 11 | // NewServer configures and returns a Server. 12 | func NewServer() *negroni.Negroni { 13 | 14 | formatter := render.New(render.Options{ 15 | IndentJSON: true, 16 | }) 17 | 18 | n := negroni.Classic() 19 | mx := mux.NewRouter() 20 | 21 | repo := newInMemoryRepository() 22 | 23 | initRoutes(mx, formatter, repo) 24 | 25 | n.UseHandler(mx) 26 | return n 27 | } 28 | 29 | func initRoutes(mx *mux.Router, formatter *render.Render, repo metricRepository) { 30 | mx.HandleFunc("/metrics", getMetricsHandler(formatter, repo)).Methods("GET") 31 | mx.HandleFunc("/metrics/{appname}", getAppMetricHandler(formatter, repo)).Methods("GET") 32 | } 33 | 34 | func testHandler(formatter *render.Render) http.HandlerFunc { 35 | 36 | return func(w http.ResponseWriter, req *http.Request) { 37 | formatter.JSON(w, http.StatusOK, struct{ Test string }{"This is a test"}) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/string_array.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/blendlabs/go-util" 7 | ) 8 | 9 | // StringArray is a type alias for []string with some helper methods. 10 | type StringArray []string 11 | 12 | // Contains returns if the given string is in the array. 13 | func (sa StringArray) Contains(elem string) bool { 14 | for _, arrayElem := range sa { 15 | if arrayElem == elem { 16 | return true 17 | } 18 | } 19 | return false 20 | } 21 | 22 | // ContainsLower returns true if the `elem` is in the StringArray, false otherwise. 23 | func (sa StringArray) ContainsLower(elem string) bool { 24 | for _, arrayElem := range sa { 25 | if strings.ToLower(arrayElem) == elem { 26 | return true 27 | } 28 | } 29 | return false 30 | } 31 | 32 | // GetByLower returns an element from the array that matches the input. 33 | func (sa StringArray) GetByLower(elem string) string { 34 | for _, arrayElem := range sa { 35 | if strings.ToLower(arrayElem) == elem { 36 | return arrayElem 37 | } 38 | } 39 | return util.StringEmpty 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/sequence_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestSequenceInts(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | expected := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} 13 | actual := Sequence.Ints(10) 14 | 15 | assert.Equal(len(actual), len(expected)) 16 | for i := 0; i < len(expected); i++ { 17 | assert.Equal(expected[i], actual[i]) 18 | } 19 | } 20 | 21 | func TestSequenceIntsFrom(t *testing.T) { 22 | assert := assert.New(t) 23 | 24 | expected := []int{5, 6, 7, 8, 9} 25 | actual := Sequence.IntsFrom(5, 10) 26 | 27 | assert.Equal(len(actual), len(expected)) 28 | for i := 0; i < len(expected); i++ { 29 | assert.Equal(expected[i], actual[i]) 30 | } 31 | } 32 | 33 | func TestSequenceIntsFromBy(t *testing.T) { 34 | assert := assert.New(t) 35 | 36 | expected := []int{0, 2, 4, 6, 8} 37 | actual := Sequence.IntsFromBy(0, 10, 2) 38 | 39 | assert.Equal(len(actual), len(expected)) 40 | for i := 0; i < len(expected); i++ { 41 | assert.Equal(expected[i], actual[i]) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/service/handlers.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/gorilla/mux" 7 | "github.com/unrolled/render" 8 | ) 9 | 10 | func getAppMetricHandler(formatter *render.Render, repo metricRepository) http.HandlerFunc { 11 | return func(w http.ResponseWriter, req *http.Request) { 12 | repo.newMetric() 13 | vars := mux.Vars(req) 14 | appName := vars["appname"] 15 | m, err := repo.getAppMetric(appName) 16 | if err != nil { 17 | formatter.JSON(w, http.StatusNotFound, err.Error()) 18 | } else { 19 | var mdr Metric 20 | mdr.copyMetric(m) 21 | formatter.JSON(w, http.StatusOK, &mdr) 22 | } 23 | } 24 | } 25 | 26 | func getMetricsHandler(formatter *render.Render, repo metricRepository) http.HandlerFunc { 27 | return func(w http.ResponseWriter, req *http.Request) { 28 | repo.newMetric() 29 | repoMetric, err := repo.getMetric() 30 | if err == nil { 31 | metric := repoMetric 32 | formatter.JSON(w, http.StatusOK, metric) 33 | } else { 34 | formatter.JSON(w, http.StatusNotFound, err.Error()) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/demux_flattener.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | // DemuxFlattener is a flattener 4 | type DemuxFlattener struct { 5 | Flatteners []Flattener 6 | } 7 | 8 | // MoveTo implements the path builder interface. 9 | func (dc DemuxFlattener) MoveTo(x, y float64) { 10 | for _, flattener := range dc.Flatteners { 11 | flattener.MoveTo(x, y) 12 | } 13 | } 14 | 15 | // LineTo implements the path builder interface. 16 | func (dc DemuxFlattener) LineTo(x, y float64) { 17 | for _, flattener := range dc.Flatteners { 18 | flattener.LineTo(x, y) 19 | } 20 | } 21 | 22 | // LineJoin implements the path builder interface. 23 | func (dc DemuxFlattener) LineJoin() { 24 | for _, flattener := range dc.Flatteners { 25 | flattener.LineJoin() 26 | } 27 | } 28 | 29 | // Close implements the path builder interface. 30 | func (dc DemuxFlattener) Close() { 31 | for _, flattener := range dc.Flatteners { 32 | flattener.Close() 33 | } 34 | } 35 | 36 | // End implements the path builder interface. 37 | func (dc DemuxFlattener) End() { 38 | for _, flattener := range dc.Flatteners { 39 | flattener.End() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/image_writer.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "bytes" 5 | "errors" 6 | "image" 7 | "image/png" 8 | ) 9 | 10 | // RGBACollector is a render target for a chart. 11 | type RGBACollector interface { 12 | SetRGBA(i *image.RGBA) 13 | } 14 | 15 | // ImageWriter is a special type of io.Writer that produces a final image. 16 | type ImageWriter struct { 17 | rgba *image.RGBA 18 | contents *bytes.Buffer 19 | } 20 | 21 | func (ir *ImageWriter) Write(buffer []byte) (int, error) { 22 | if ir.contents == nil { 23 | ir.contents = bytes.NewBuffer([]byte{}) 24 | } 25 | return ir.contents.Write(buffer) 26 | } 27 | 28 | // SetRGBA sets a raw version of the image. 29 | func (ir *ImageWriter) SetRGBA(i *image.RGBA) { 30 | ir.rgba = i 31 | } 32 | 33 | // Image returns an *image.Image for the result. 34 | func (ir *ImageWriter) Image() (image.Image, error) { 35 | if ir.rgba != nil { 36 | return ir.rgba, nil 37 | } 38 | if ir.contents != nil && ir.contents.Len() > 0 { 39 | return png.Decode(ir.contents) 40 | } 41 | return nil, errors.New("no valid sources for image data, cannot continue") 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/matrix/regression.go: -------------------------------------------------------------------------------- 1 | package matrix 2 | 3 | import "errors" 4 | 5 | var ( 6 | // ErrPolyRegArraysSameLength is a common error. 7 | ErrPolyRegArraysSameLength = errors.New("polynomial array inputs must be the same length") 8 | ) 9 | 10 | // Poly returns the polynomial regress of a given degree over the given values. 11 | func Poly(xvalues, yvalues []float64, degree int) ([]float64, error) { 12 | if len(xvalues) != len(yvalues) { 13 | return nil, ErrPolyRegArraysSameLength 14 | } 15 | 16 | m := len(yvalues) 17 | n := degree + 1 18 | y := New(m, 1, yvalues...) 19 | x := Zero(m, n) 20 | 21 | for i := 0; i < m; i++ { 22 | ip := float64(1) 23 | for j := 0; j < n; j++ { 24 | x.Set(i, j, ip) 25 | ip *= xvalues[i] 26 | } 27 | } 28 | 29 | q, r := x.QR() 30 | qty, err := q.Transpose().Times(y) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | c := make([]float64, n) 36 | for i := n - 1; i >= 0; i-- { 37 | c[i] = qty.Get(i, 0) 38 | for j := i + 1; j < n; j++ { 39 | c[i] -= c[j] * r.Get(i, j) 40 | } 41 | c[i] /= r.Get(i, i) 42 | } 43 | 44 | return c, nil 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/channel_queue_test.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestConcurrentQueue(t *testing.T) { 10 | a := assert.New(t) 11 | 12 | q := NewChannelQueue(4) 13 | a.Empty(q.AsSlice()) 14 | a.Nil(q.Dequeue()) 15 | a.Equal(0, q.Len()) 16 | 17 | q.Enqueue("foo") 18 | a.Equal(1, q.Len()) 19 | 20 | q.Enqueue("bar") 21 | a.Equal(2, q.Len()) 22 | 23 | q.Enqueue("baz") 24 | a.Equal(3, q.Len()) 25 | 26 | q.Enqueue("fizz") 27 | a.Equal(4, q.Len()) 28 | 29 | values := q.AsSlice() 30 | a.Len(values, 4) 31 | a.Equal("foo", values[0]) 32 | a.Equal("bar", values[1]) 33 | a.Equal("baz", values[2]) 34 | a.Equal("fizz", values[3]) 35 | 36 | shouldBeFoo := q.Dequeue() 37 | a.Equal("foo", shouldBeFoo) 38 | a.Equal(3, q.Len()) 39 | 40 | shouldBeBar := q.Dequeue() 41 | a.Equal("bar", shouldBeBar) 42 | a.Equal(2, q.Len()) 43 | 44 | shouldBeBaz := q.Dequeue() 45 | a.Equal("baz", shouldBeBaz) 46 | a.Equal(1, q.Len()) 47 | 48 | shouldBeFizz := q.Dequeue() 49 | a.Equal("fizz", shouldBeFizz) 50 | a.Equal(0, q.Len()) 51 | } 52 | -------------------------------------------------------------------------------- /chart/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "chart.fullname" . -}} 3 | {{- $servicePort := .Values.service.port -}} 4 | {{- $ingressPath := .Values.ingress.path -}} 5 | apiVersion: extensions/v1beta1 6 | kind: Ingress 7 | metadata: 8 | name: {{ $fullName }} 9 | labels: 10 | app: {{ template "chart.name" . }} 11 | chart: {{ template "chart.chart" . }} 12 | release: {{ .Release.Name }} 13 | heritage: {{ .Release.Service }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{ toYaml . | indent 4 }} 17 | {{- end }} 18 | spec: 19 | {{- if .Values.ingress.tls }} 20 | tls: 21 | {{- range .Values.ingress.tls }} 22 | - hosts: 23 | {{- range .hosts }} 24 | - {{ . }} 25 | {{- end }} 26 | secretName: {{ .secretName }} 27 | {{- end }} 28 | {{- end }} 29 | rules: 30 | {{- range .Values.ingress.hosts }} 31 | - host: {{ . }} 32 | http: 33 | paths: 34 | - path: {{ $ingressPath }} 35 | backend: 36 | serviceName: {{ $fullName }} 37 | servicePort: http 38 | {{- end }} 39 | {{- end }} 40 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/basic/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | 7 | "github.com/wcharczuk/go-chart" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | graph := chart.Chart{ 12 | Series: []chart.Series{ 13 | chart.ContinuousSeries{ 14 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 15 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 16 | }, 17 | }, 18 | } 19 | 20 | res.Header().Set("Content-Type", "image/png") 21 | graph.Render(chart.PNG, res) 22 | } 23 | 24 | func drawChartWide(res http.ResponseWriter, req *http.Request) { 25 | graph := chart.Chart{ 26 | Width: 1920, //this overrides the default. 27 | Series: []chart.Series{ 28 | chart.ContinuousSeries{ 29 | XValues: []float64{1.0, 2.0, 3.0, 4.0}, 30 | YValues: []float64{1.0, 2.0, 3.0, 4.0}, 31 | }, 32 | }, 33 | } 34 | 35 | res.Header().Set("Content-Type", "image/png") 36 | graph.Render(chart.PNG, res) 37 | } 38 | 39 | func main() { 40 | http.HandleFunc("/", drawChart) 41 | http.HandleFunc("/wide", drawChartWide) 42 | log.Fatal(http.ListenAndServe(":8080", nil)) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/transformer.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The draw2d Authors. All rights reserved. 2 | // created: 13/12/2010 by Laurent Le Goff 3 | 4 | package drawing 5 | 6 | // Transformer apply the Matrix transformation tr 7 | type Transformer struct { 8 | Tr Matrix 9 | Flattener Flattener 10 | } 11 | 12 | // MoveTo implements the path builder interface. 13 | func (t Transformer) MoveTo(x, y float64) { 14 | u := x*t.Tr[0] + y*t.Tr[2] + t.Tr[4] 15 | v := x*t.Tr[1] + y*t.Tr[3] + t.Tr[5] 16 | t.Flattener.MoveTo(u, v) 17 | } 18 | 19 | // LineTo implements the path builder interface. 20 | func (t Transformer) LineTo(x, y float64) { 21 | u := x*t.Tr[0] + y*t.Tr[2] + t.Tr[4] 22 | v := x*t.Tr[1] + y*t.Tr[3] + t.Tr[5] 23 | t.Flattener.LineTo(u, v) 24 | } 25 | 26 | // LineJoin implements the path builder interface. 27 | func (t Transformer) LineJoin() { 28 | t.Flattener.LineJoin() 29 | } 30 | 31 | // Close implements the path builder interface. 32 | func (t Transformer) Close() { 33 | t.Flattener.Close() 34 | } 35 | 36 | // End implements the path builder interface. 37 | func (t Transformer) End() { 38 | t.Flattener.End() 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-exception/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | notifications: 5 | slack: 6 | rooms: 7 | secure: "L21izvG9BvI3dRVlxachMKKfXwEDDAKMl+lZ7uo3jsTsBf+0nfGgX3f0FTebbTOraPWXQ6U77p2/2WsAokebZOmRTEEF/WPkZ+3I25f0HANCKvI/Ow0KJ3fyDSar46jYCavvxeJtEeYWdaLLGIwmV5v5NxhlIqIybKYdFl86iRS7J4Puw805QamugKH1ardvf4xRLQ8qS/EoD5M9Rm2Q6XkMsrkaS3fIraExmBLUq9ulVzqXyO6berc25aMCfAhk46fgnVHykF9jShAPXqISSFYronztEsvAqnpqcFz0byY6q3w+RtAlA3xVJfGeE3mFrG+OQP4LQ79YFIOdZ8x/cQ1ijBmgnznClb82ji2yg/iDgE/xDDLb29ZUI6eieS0yzZUXFk2jBLIoynaallhQmPjGDYx8FlaK1OEHXjUD2C4uy0rcfb9W4CnF++S4EkYbsBfURYcVH72N2chirg96e20Ejmo9naEI4IXY4x7BGsbjPZ2geVkoEioZR0/CIWK40TBt78+Pp/MUyDO7a2/ek3Y33Pj4T4YCcnanWYZiZvy7WTJpL1pbQYvqZCqhnqbFEtd2IgEmBILKZQheA4FxkIWUschOKKwj49qfR3zpQPoFEi+CJyneyGvmhfNYzhttg/JdlIZiISI9k+LPDF+UIHHByuVdW4uKGT6GgVXBIAA=" 8 | on_success: always 9 | on_failure: always 10 | template: 11 | - "%{repository_slug} %{message} %{duration}" 12 | - "%{author} : (<%{compare_url}|%{commit}>) %{commit_message}" 13 | - "Build Details: %{build_url}" 14 | 15 | before_script: 16 | - go get -u github.com/blendlabs/go-assert 17 | 18 | script: 19 | - go test 20 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 William Charczuk. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Blend Labs, inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Cory Jacobsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /chart/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "chart.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "chart.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "chart.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-exception/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Blend Labs, inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/collections/rate_limiter.go: -------------------------------------------------------------------------------- 1 | package collections 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // NewRateLimiter returns a new RateLimiter instance. 8 | func NewRateLimiter(numberOfActions int, quantum time.Duration) *RateLimiter { 9 | return &RateLimiter{ 10 | NumberOfActions: numberOfActions, 11 | Quantum: quantum, 12 | Limits: map[string]Queue{}, 13 | } 14 | } 15 | 16 | // RateLimiter is a simple implementation of a rate checker. 17 | type RateLimiter struct { 18 | NumberOfActions int 19 | Quantum time.Duration 20 | Limits map[string]Queue 21 | } 22 | 23 | // Check returns true if it has been called NumberOfActions times or more in Quantum or smaller duration. 24 | func (rl *RateLimiter) Check(id string) bool { 25 | queue, hasQueue := rl.Limits[id] 26 | if !hasQueue { 27 | queue = NewRingBufferWithCapacity(rl.NumberOfActions) 28 | rl.Limits[id] = queue 29 | } 30 | 31 | currentTime := time.Now().UTC() 32 | queue.Enqueue(currentTime) 33 | if queue.Len() < rl.NumberOfActions { 34 | return false 35 | } 36 | 37 | oldest := queue.Dequeue().(time.Time) 38 | return currentTime.Sub(oldest) < rl.Quantum 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/buffer.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import "bytes" 4 | 5 | // bufPool represents a reusable buffer pool for executing templates into. 6 | var bufPool *BufferPool 7 | 8 | // BufferPool implements a pool of bytes.Buffers in the form of a bounded channel. 9 | // Pulled from the github.com/oxtoacart/bpool package (Apache licensed). 10 | type BufferPool struct { 11 | c chan *bytes.Buffer 12 | } 13 | 14 | // NewBufferPool creates a new BufferPool bounded to the given size. 15 | func NewBufferPool(size int) (bp *BufferPool) { 16 | return &BufferPool{ 17 | c: make(chan *bytes.Buffer, size), 18 | } 19 | } 20 | 21 | // Get gets a Buffer from the BufferPool, or creates a new one if none are 22 | // available in the pool. 23 | func (bp *BufferPool) Get() (b *bytes.Buffer) { 24 | select { 25 | case b = <-bp.c: 26 | // reuse existing buffer 27 | default: 28 | // create new buffer 29 | b = bytes.NewBuffer([]byte{}) 30 | } 31 | return 32 | } 33 | 34 | // Put returns the given Buffer to the BufferPool. 35 | func (bp *BufferPool) Put(b *bytes.Buffer) { 36 | b.Reset() 37 | select { 38 | case bp.c <- b: 39 | default: // Discard the buffer if the pool is full. 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/concat_series.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | // ConcatSeries is a special type of series that concatenates its `InnerSeries`. 4 | type ConcatSeries []Series 5 | 6 | // Len returns the length of the concatenated set of series. 7 | func (cs ConcatSeries) Len() int { 8 | total := 0 9 | for _, s := range cs { 10 | if typed, isValuesProvider := s.(ValuesProvider); isValuesProvider { 11 | total += typed.Len() 12 | } 13 | } 14 | 15 | return total 16 | } 17 | 18 | // GetValue returns the value at the (meta) index (i.e 0 => totalLen-1) 19 | func (cs ConcatSeries) GetValue(index int) (x, y float64) { 20 | cursor := 0 21 | for _, s := range cs { 22 | if typed, isValuesProvider := s.(ValuesProvider); isValuesProvider { 23 | len := typed.Len() 24 | if index < cursor+len { 25 | x, y = typed.GetValues(index - cursor) //FENCEPOSTS. 26 | return 27 | } 28 | cursor += typed.Len() 29 | } 30 | } 31 | return 32 | } 33 | 34 | // Validate validates the series. 35 | func (cs ConcatSeries) Validate() error { 36 | var err error 37 | for _, s := range cs { 38 | err = s.Validate() 39 | if err != nil { 40 | return err 41 | } 42 | } 43 | return nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Cory Jacobsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/codegangsta/negroni/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/buffer.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import "bytes" 4 | 5 | // bufPool represents a reusable buffer pool for executing templates into. 6 | var bufPool *BufferPool 7 | 8 | // BufferPool implements a pool of bytes.Buffers in the form of a bounded channel. 9 | // Pulled from the github.com/oxtoacart/bpool package (Apache licensed). 10 | type BufferPool struct { 11 | c chan *bytes.Buffer 12 | } 13 | 14 | // NewBufferPool creates a new BufferPool bounded to the given size. 15 | func NewBufferPool(size int) (bp *BufferPool) { 16 | return &BufferPool{ 17 | c: make(chan *bytes.Buffer, size), 18 | } 19 | } 20 | 21 | // Get gets a Buffer from the BufferPool, or creates a new one if none are 22 | // available in the pool. 23 | func (bp *BufferPool) Get() (b *bytes.Buffer) { 24 | select { 25 | case b = <-bp.c: 26 | // reuse existing buffer 27 | default: 28 | // create new buffer 29 | b = bytes.NewBuffer([]byte{}) 30 | } 31 | return 32 | } 33 | 34 | // Put returns the given Buffer to the BufferPool. 35 | func (bp *BufferPool) Put(b *bytes.Buffer) { 36 | b.Reset() 37 | select { 38 | case bp.c <- b: 39 | default: // Discard the buffer if the pool is full. 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/boolean.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/blendlabs/go-exception" 7 | ) 8 | 9 | var ( 10 | // BooleanTrue represents a true value for a boolean. 11 | BooleanTrue Boolean = true 12 | 13 | // BooleanFalse represents a false value for a boolean. 14 | BooleanFalse Boolean = false 15 | ) 16 | 17 | // Boolean is a type alias for bool that can be unmarshaled from 0|1, true|false etc. 18 | type Boolean bool 19 | 20 | // UnmarshalJSON unmarshals the boolean from json. 21 | func (bit *Boolean) UnmarshalJSON(data []byte) error { 22 | asString := strings.ToLower(string(data)) 23 | if asString == "1" || asString == "true" { 24 | *bit = true 25 | return nil 26 | } else if asString == "0" || asString == "false" { 27 | *bit = false 28 | return nil 29 | } else if len(asString) > 0 && (asString[0] == '"' || asString[0] == '\'') { 30 | cleaned := String.StripQuotes(asString) 31 | return bit.UnmarshalJSON([]byte(cleaned)) 32 | } 33 | return exception.Newf("Boolean unmarshal error: invalid input %s", asString) 34 | } 35 | 36 | // AsBool returns the stdlib bool value for the boolean. 37 | func (bit Boolean) AsBool() bool { 38 | if bit { 39 | return true 40 | } 41 | return false 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_formatters/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "github.com/wcharczuk/go-chart" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | /* 12 | In this example we use a custom `ValueFormatter` for the y axis, letting us specify how to format text of the y-axis ticks. 13 | You can also do this for the x-axis, or the secondary y-axis. 14 | This example also shows what the chart looks like with the x-axis left off or not shown. 15 | */ 16 | 17 | graph := chart.Chart{ 18 | YAxis: chart.YAxis{ 19 | Style: chart.Style{ 20 | Show: true, 21 | }, 22 | ValueFormatter: func(v interface{}) string { 23 | if vf, isFloat := v.(float64); isFloat { 24 | return fmt.Sprintf("%0.6f", vf) 25 | } 26 | return "" 27 | }, 28 | }, 29 | Series: []chart.Series{ 30 | chart.ContinuousSeries{ 31 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 32 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 33 | }, 34 | }, 35 | } 36 | 37 | res.Header().Set("Content-Type", "image/png") 38 | graph.Render(chart.PNG, res) 39 | } 40 | 41 | func main() { 42 | http.HandleFunc("/", drawChart) 43 | http.ListenAndServe(":8080", nil) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/math/f32/f32.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package f32 implements float32 vector and matrix types. 6 | package f32 // import "golang.org/x/image/math/f32" 7 | 8 | // Vec2 is a 2-element vector. 9 | type Vec2 [2]float32 10 | 11 | // Vec3 is a 3-element vector. 12 | type Vec3 [3]float32 13 | 14 | // Vec4 is a 4-element vector. 15 | type Vec4 [4]float32 16 | 17 | // Mat3 is a 3x3 matrix in row major order. 18 | // 19 | // m[3*r + c] is the element in the r'th row and c'th column. 20 | type Mat3 [9]float32 21 | 22 | // Mat4 is a 4x4 matrix in row major order. 23 | // 24 | // m[4*r + c] is the element in the r'th row and c'th column. 25 | type Mat4 [16]float32 26 | 27 | // Aff3 is a 3x3 affine transformation matrix in row major order, where the 28 | // bottom row is implicitly [0 0 1]. 29 | // 30 | // m[3*r + c] is the element in the r'th row and c'th column. 31 | type Aff3 [6]float32 32 | 33 | // Aff4 is a 4x4 affine transformation matrix in row major order, where the 34 | // bottom row is implicitly [0 0 0 1]. 35 | // 36 | // m[4*r + c] is the element in the r'th row and c'th column. 37 | type Aff4 [12]float32 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/math/f64/f64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package f64 implements float64 vector and matrix types. 6 | package f64 // import "golang.org/x/image/math/f64" 7 | 8 | // Vec2 is a 2-element vector. 9 | type Vec2 [2]float64 10 | 11 | // Vec3 is a 3-element vector. 12 | type Vec3 [3]float64 13 | 14 | // Vec4 is a 4-element vector. 15 | type Vec4 [4]float64 16 | 17 | // Mat3 is a 3x3 matrix in row major order. 18 | // 19 | // m[3*r + c] is the element in the r'th row and c'th column. 20 | type Mat3 [9]float64 21 | 22 | // Mat4 is a 4x4 matrix in row major order. 23 | // 24 | // m[4*r + c] is the element in the r'th row and c'th column. 25 | type Mat4 [16]float64 26 | 27 | // Aff3 is a 3x3 affine transformation matrix in row major order, where the 28 | // bottom row is implicitly [0 0 1]. 29 | // 30 | // m[3*r + c] is the element in the r'th row and c'th column. 31 | type Aff3 [6]float64 32 | 33 | // Aff4 is a 4x4 affine transformation matrix in row major order, where the 34 | // bottom row is implicitly [0 0 0 1]. 35 | // 36 | // m[4*r + c] is the element in the r'th row and c'th column. 37 | type Aff4 [12]float64 38 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/simple_moving_average/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | "github.com/wcharczuk/go-chart/seq" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | 12 | mainSeries := chart.ContinuousSeries{ 13 | Name: "A test series", 14 | XValues: seq.Range(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements. 15 | YValues: seq.RandomValuesWithMax(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements. 16 | } 17 | 18 | // note we create a SimpleMovingAverage series by assignin the inner series. 19 | // we need to use a reference because `.Render()` needs to modify state within the series. 20 | smaSeries := &chart.SMASeries{ 21 | InnerSeries: mainSeries, 22 | } // we can optionally set the `WindowSize` property which alters how the moving average is calculated. 23 | 24 | graph := chart.Chart{ 25 | Series: []chart.Series{ 26 | mainSeries, 27 | smaSeries, 28 | }, 29 | } 30 | 31 | res.Header().Set("Content-Type", "image/png") 32 | graph.Render(chart.PNG, res) 33 | } 34 | 35 | func main() { 36 | http.HandleFunc("/", drawChart) 37 | http.ListenAndServe(":8080", nil) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/last_value_annotation_series.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import "fmt" 4 | 5 | // LastValueAnnotation returns an annotation series of just the last value of a value provider. 6 | func LastValueAnnotation(innerSeries ValuesProvider, vfs ...ValueFormatter) AnnotationSeries { 7 | var vf ValueFormatter 8 | if len(vfs) > 0 { 9 | vf = vfs[0] 10 | } else if typed, isTyped := innerSeries.(ValueFormatterProvider); isTyped { 11 | _, vf = typed.GetValueFormatters() 12 | } else { 13 | vf = FloatValueFormatter 14 | } 15 | 16 | var lastValue Value2 17 | if typed, isTyped := innerSeries.(LastValuesProvider); isTyped { 18 | lastValue.XValue, lastValue.YValue = typed.GetLastValues() 19 | lastValue.Label = vf(lastValue.YValue) 20 | } else { 21 | lastValue.XValue, lastValue.YValue = innerSeries.GetValues(innerSeries.Len() - 1) 22 | lastValue.Label = vf(lastValue.YValue) 23 | } 24 | 25 | var seriesName string 26 | var seriesStyle Style 27 | if typed, isTyped := innerSeries.(Series); isTyped { 28 | seriesName = fmt.Sprintf("%s - Last Value", typed.GetName()) 29 | seriesStyle = typed.GetStyle() 30 | } 31 | 32 | return AnnotationSeries{ 33 | Name: seriesName, 34 | Style: seriesStyle, 35 | Annotations: []Value2{lastValue}, 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/service/repo.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "errors" 5 | "math/rand" 6 | "os" 7 | "strings" 8 | ) 9 | 10 | type inMemoryMetricRepository struct { 11 | AppMetric Metric 12 | } 13 | 14 | // NewRepository creates a new in-memory Metric repository 15 | func newInMemoryRepository() *inMemoryMetricRepository { 16 | repo := &inMemoryMetricRepository{} 17 | repo.newFakeMetric() 18 | return repo 19 | } 20 | 21 | func (repo *inMemoryMetricRepository) newMetric() (err error) { 22 | repo.newFakeMetric() 23 | return err 24 | } 25 | 26 | func (repo *inMemoryMetricRepository) getMetric() (metric Metric, err error) { 27 | return repo.AppMetric, err 28 | } 29 | 30 | func (repo *inMemoryMetricRepository) getAppMetric(appName string) (metric Metric, err error) { 31 | if strings.Compare(repo.AppMetric.AppName, appName) == 0 { 32 | metric = repo.AppMetric 33 | } else { 34 | err = errors.New("Could not find metric in repository") 35 | } 36 | return metric, err 37 | } 38 | 39 | func (repo *inMemoryMetricRepository) newFakeMetric() { 40 | repo.AppMetric = Metric{PerformanceIndex{rand.Float64(), rand.Int63n(100), rand.Int63n(100), rand.Int63n(100), rand.Int63n(100), 41 | rand.Int63n(100)}, os.Getenv("HOSTNAME"), "test-app", "test-domain"} 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/value.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import util "github.com/blendlabs/go-util" 4 | 5 | // Value is a chart value. 6 | type Value struct { 7 | Style Style 8 | Label string 9 | Value float64 10 | } 11 | 12 | // Values is an array of Value. 13 | type Values []Value 14 | 15 | // Values returns the values. 16 | func (vs Values) Values() []float64 { 17 | values := make([]float64, len(vs)) 18 | for index, v := range vs { 19 | values[index] = v.Value 20 | } 21 | return values 22 | } 23 | 24 | // ValuesNormalized returns normalized values. 25 | func (vs Values) ValuesNormalized() []float64 { 26 | return util.Math.Normalize(vs.Values()...) 27 | } 28 | 29 | // Normalize returns the values normalized. 30 | func (vs Values) Normalize() []Value { 31 | var output []Value 32 | var total float64 33 | 34 | for _, v := range vs { 35 | total += v.Value 36 | } 37 | 38 | for _, v := range vs { 39 | if v.Value > 0 { 40 | output = append(output, Value{ 41 | Style: v.Style, 42 | Label: v.Label, 43 | Value: util.Math.RoundDown(v.Value/total, 0.0001), 44 | }) 45 | } 46 | } 47 | return output 48 | } 49 | 50 | // Value2 is a two axis value. 51 | type Value2 struct { 52 | Style Style 53 | Label string 54 | XValue, YValue float64 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_styles/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | "github.com/wcharczuk/go-chart/drawing" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | /* 12 | In this example we set some custom colors for the series and the chart background and canvas. 13 | */ 14 | graph := chart.Chart{ 15 | Background: chart.Style{ 16 | FillColor: drawing.ColorBlue, 17 | }, 18 | Canvas: chart.Style{ 19 | FillColor: drawing.ColorFromHex("efefef"), 20 | }, 21 | Series: []chart.Series{ 22 | chart.ContinuousSeries{ 23 | Style: chart.Style{ 24 | Show: true, //note; if we set ANY other properties, we must set this to true. 25 | StrokeColor: drawing.ColorRed, // will supercede defaults 26 | FillColor: drawing.ColorRed.WithAlpha(64), // will supercede defaults 27 | }, 28 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 29 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 30 | }, 31 | }, 32 | } 33 | 34 | res.Header().Set("Content-Type", "image/png") 35 | graph.Render(chart.PNG, res) 36 | } 37 | 38 | func main() { 39 | http.HandleFunc("/", drawChart) 40 | http.ListenAndServe(":8080", nil) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/custom_ticks/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | ) 8 | 9 | func drawChart(res http.ResponseWriter, req *http.Request) { 10 | /* 11 | In this example we set a custom set of ticks to use for the y-axis. It can be (almost) whatever you want, including some custom labels for ticks. 12 | Custom ticks will supercede a custom range, which will supercede automatic generation based on series values. 13 | */ 14 | 15 | graph := chart.Chart{ 16 | YAxis: chart.YAxis{ 17 | Style: chart.Style{ 18 | Show: true, 19 | }, 20 | Range: &chart.ContinuousRange{ 21 | Min: 0.0, 22 | Max: 4.0, 23 | }, 24 | Ticks: []chart.Tick{ 25 | {0.0, "0.00"}, 26 | {2.0, "2.00"}, 27 | {4.0, "4.00"}, 28 | {6.0, "6.00"}, 29 | {8.0, "Eight"}, 30 | {10.0, "Ten"}, 31 | }, 32 | }, 33 | Series: []chart.Series{ 34 | chart.ContinuousSeries{ 35 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 36 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 37 | }, 38 | }, 39 | } 40 | 41 | res.Header().Set("Content-Type", "image/png") 42 | graph.Render(chart.PNG, res) 43 | } 44 | 45 | func main() { 46 | http.HandleFunc("/", drawChart) 47 | http.ListenAndServe(":8080", nil) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/seq/linear_test.go: -------------------------------------------------------------------------------- 1 | package seq 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestRange(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | values := Range(1, 100) 13 | assert.Len(values, 100) 14 | assert.Equal(1, values[0]) 15 | assert.Equal(100, values[99]) 16 | } 17 | 18 | func TestRangeWithStep(t *testing.T) { 19 | assert := assert.New(t) 20 | 21 | values := RangeWithStep(0, 100, 5) 22 | assert.Equal(100, values[20]) 23 | assert.Len(values, 21) 24 | } 25 | 26 | func TestRangeReversed(t *testing.T) { 27 | assert := assert.New(t) 28 | 29 | values := Range(10.0, 1.0) 30 | assert.Equal(10, len(values)) 31 | assert.Equal(10.0, values[0]) 32 | assert.Equal(1.0, values[9]) 33 | } 34 | 35 | func TestValuesRegression(t *testing.T) { 36 | assert := assert.New(t) 37 | 38 | // note; this assumes a 1.0 step is implicitly set in the constructor. 39 | linearProvider := NewLinear().WithStart(1.0).WithEnd(100.0) 40 | assert.Equal(1, linearProvider.Start()) 41 | assert.Equal(100, linearProvider.End()) 42 | assert.Equal(100, linearProvider.Len()) 43 | 44 | values := Seq{Provider: linearProvider}.Array() 45 | assert.Len(values, 100) 46 | assert.Equal(1.0, values[0]) 47 | assert.Equal(100, values[99]) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/vector_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestMultiplyByElement(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | vec1 := []float64{2.0, 2.0, 3.0} 13 | vec2 := []float64{2.5, 6.0, 4.0} 14 | 15 | result, err := Vector.MultiplyByElement(vec1, vec2) 16 | assert.Nil(err) 17 | assert.Equal([]float64{5.0, 12.0, 12.0}, result) 18 | 19 | vec1 = []float64{2.0, 3.0} 20 | vec2 = []float64{2.5, 6.0, 4.0} 21 | 22 | result, err = Vector.MultiplyByElement(vec1, vec2) 23 | assert.NotNil(err) 24 | assert.Nil(result) 25 | } 26 | 27 | func TestNormalize(t *testing.T) { 28 | assert := assert.New(t) 29 | 30 | vec := []float64{3.0, 4.0} 31 | result, err := Vector.Normalize(vec) 32 | assert.Equal([]float64{0.6, 0.8}, result) 33 | 34 | vec = []float64{0, 0, 0, 0} 35 | result, err = Vector.Normalize(vec) 36 | assert.NotNil(err) 37 | assert.Equal([]float64{0, 0, 0, 0}, result) 38 | } 39 | 40 | func TestGetMagnitude(t *testing.T) { 41 | assert := assert.New(t) 42 | 43 | vec := []float64{3.0, 4.0} 44 | result := Vector.GetMagnitude(vec) 45 | assert.Equal(5.0, result) 46 | 47 | vec = []float64{1.0, 1.0, 1.0, 1.0} 48 | result = Vector.GetMagnitude(vec) 49 | assert.Equal(2.0, result) 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/bar_chart/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | "os" 8 | 9 | "github.com/wcharczuk/go-chart" 10 | ) 11 | 12 | func drawChart(res http.ResponseWriter, req *http.Request) { 13 | sbc := chart.BarChart{ 14 | Height: 512, 15 | BarWidth: 60, 16 | XAxis: chart.Style{ 17 | Show: true, 18 | }, 19 | YAxis: chart.YAxis{ 20 | Style: chart.Style{ 21 | Show: true, 22 | }, 23 | }, 24 | Bars: []chart.Value{ 25 | {Value: 5.25, Label: "Blue"}, 26 | {Value: 4.88, Label: "Green"}, 27 | {Value: 4.74, Label: "Gray"}, 28 | {Value: 3.22, Label: "Orange"}, 29 | {Value: 3, Label: "Test"}, 30 | {Value: 2.27, Label: "??"}, 31 | {Value: 1, Label: "!!"}, 32 | }, 33 | } 34 | 35 | res.Header().Set("Content-Type", "image/png") 36 | err := sbc.Render(chart.PNG, res) 37 | if err != nil { 38 | fmt.Printf("Error rendering chart: %v\n", err) 39 | } 40 | } 41 | 42 | func port() string { 43 | if len(os.Getenv("PORT")) > 0 { 44 | return os.Getenv("PORT") 45 | } 46 | return "8080" 47 | } 48 | 49 | func main() { 50 | listenPort := fmt.Sprintf(":%s", port()) 51 | fmt.Printf("Listening on %s\n", listenPort) 52 | http.HandleFunc("/", drawChart) 53 | log.Fatal(http.ListenAndServe(listenPort, nil)) 54 | } 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![wercker status](https://app.wercker.com/status/5f9c6c840c21111c17ec08ee9169347f/s/master "wercker status")](https://app.wercker.com/project/byKey/5f9c6c840c21111c17ec08ee9169347f) 2 | 3 | # Kubernetes application monitor agent 4 | 5 | This is a sample code used by [kubernetes-handbook](https://github.com/rootsongjc/kubernetes-handbook) 6 | 7 | Get the metrics from the service [k8s-app-monitor-test](https://github.com/rootsongjc/k8s-app-monitor-test) and show a chart in the web browser, every time you refresh the browser will get a new chart. 8 | 9 | ![chart](images/chart.png) 10 | 11 | **Note**: This app depend on [k8s-app-monitor-test](https://github.com/rootsongjc/k8s-app-monitor-test) so that it cannot running alone. 12 | 13 | ## Usage 14 | 15 | **Step1 Change image tags** 16 | 17 | Based on the image tags in fact, change the tag for `monitor-agent` and `monitor-test` images. 18 | 19 | **Step2 Rock it** 20 | 21 | Make sure `docker-compose` has been installed already and then run the following command. 22 | 23 | ```bash 24 | docker-compose up 25 | ``` 26 | 27 | **Step3 View in browser** 28 | 29 | Open the following URL in your brower. 30 | 31 | http://localhost:8888 32 | 33 | You will see the picture in the beginning. Try to refresh the page, you will see different date every time you fresh the page. -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/bollinger_band_series_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "fmt" 5 | "math" 6 | "testing" 7 | 8 | "github.com/blendlabs/go-assert" 9 | "github.com/wcharczuk/go-chart/seq" 10 | ) 11 | 12 | func TestBollingerBandSeries(t *testing.T) { 13 | assert := assert.New(t) 14 | 15 | s1 := mockValuesProvider{ 16 | X: seq.Range(1.0, 100.0), 17 | Y: seq.RandomValuesWithMax(100, 1024), 18 | } 19 | 20 | bbs := &BollingerBandsSeries{ 21 | InnerSeries: s1, 22 | } 23 | 24 | xvalues := make([]float64, 100) 25 | y1values := make([]float64, 100) 26 | y2values := make([]float64, 100) 27 | 28 | for x := 0; x < 100; x++ { 29 | xvalues[x], y1values[x], y2values[x] = bbs.GetBoundedValues(x) 30 | } 31 | 32 | for x := bbs.GetPeriod(); x < 100; x++ { 33 | assert.True(y1values[x] > y2values[x], fmt.Sprintf("%v vs. %v", y1values[x], y2values[x])) 34 | } 35 | } 36 | 37 | func TestBollingerBandLastValue(t *testing.T) { 38 | assert := assert.New(t) 39 | 40 | s1 := mockValuesProvider{ 41 | X: seq.Range(1.0, 100.0), 42 | Y: seq.Range(1.0, 100.0), 43 | } 44 | 45 | bbs := &BollingerBandsSeries{ 46 | InnerSeries: s1, 47 | } 48 | 49 | x, y1, y2 := bbs.GetBoundedLastValues() 50 | assert.Equal(100.0, x) 51 | assert.Equal(101, math.Floor(y1)) 52 | assert.Equal(83, math.Floor(y2)) 53 | } 54 | -------------------------------------------------------------------------------- /vendor/github.com/golang/freetype/truetype/face_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Freetype-Go Authors. All rights reserved. 2 | // Use of this source code is governed by your choice of either the 3 | // FreeType License or the GNU General Public License version 2 (or 4 | // any later version), both of which can be found in the LICENSE file. 5 | 6 | package truetype 7 | 8 | import ( 9 | "image" 10 | "image/draw" 11 | "io/ioutil" 12 | "strings" 13 | "testing" 14 | 15 | "golang.org/x/image/font" 16 | "golang.org/x/image/math/fixed" 17 | ) 18 | 19 | func BenchmarkDrawString(b *testing.B) { 20 | data, err := ioutil.ReadFile("../licenses/gpl.txt") 21 | if err != nil { 22 | b.Fatal(err) 23 | } 24 | lines := strings.Split(string(data), "\n") 25 | data, err = ioutil.ReadFile("../testdata/luxisr.ttf") 26 | if err != nil { 27 | b.Fatal(err) 28 | } 29 | f, err := Parse(data) 30 | if err != nil { 31 | b.Fatal(err) 32 | } 33 | dst := image.NewRGBA(image.Rect(0, 0, 800, 600)) 34 | draw.Draw(dst, dst.Bounds(), image.White, image.ZP, draw.Src) 35 | d := &font.Drawer{ 36 | Dst: dst, 37 | Src: image.Black, 38 | Face: NewFace(f, nil), 39 | } 40 | b.ReportAllocs() 41 | b.ResetTimer() 42 | for i := 0; i < b.N; i++ { 43 | for j, line := range lines { 44 | d.Dot = fixed.P(0, (j*16)%600) 45 | d.DrawString(line) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /chart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for chart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: jimmysong/k8s-app-monitor-agent 9 | tag: 749f547 10 | pullPolicy: IfNotPresent 11 | port: 8888 12 | env: 13 | SERVICE_NAME: k8s-app-monitor-test 14 | 15 | service: 16 | type: ClusterIP 17 | port: 8888 18 | 19 | ingress: 20 | enabled: true 21 | annotations: {} 22 | # kubernetes.io/ingress.class: traefik 23 | # kubernetes.io/tls-acme: "true" 24 | path: /k8s-app-monitor-agent 25 | hosts: 26 | - k8s-app-monitor-agent.jimmysong.io 27 | tls: [] 28 | # - secretName: chart-example-tls 29 | # hosts: 30 | # - chart-example.local 31 | 32 | resources: {} 33 | # We usually recommend not to specify default resources and to leave this as a conscious 34 | # choice for the user. This also increases chances charts run on environments with little 35 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 36 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 37 | # limits: 38 | # cpu: 100m 39 | # memory: 128Mi 40 | # requests: 41 | # cpu: 100m 42 | # memory: 128Mi 43 | 44 | nodeSelector: {} 45 | 46 | tolerations: [] 47 | 48 | affinity: {} 49 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/poly_regression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | "github.com/wcharczuk/go-chart/seq" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | 12 | /* 13 | In this example we add a new type of series, a `PolynomialRegressionSeries` that takes another series as a required argument. 14 | InnerSeries only needs to implement `ValuesProvider`, so really you could chain `PolynomialRegressionSeries` together if you wanted. 15 | */ 16 | 17 | mainSeries := chart.ContinuousSeries{ 18 | Name: "A test series", 19 | XValues: seq.Range(1.0, 100.0), //generates a []float64 from 1.0 to 100.0 in 1.0 step increments, or 100 elements. 20 | YValues: seq.RandomValuesWithAverage(100, 100), //generates a []float64 randomly from 0 to 100 with 100 elements. 21 | } 22 | 23 | polyRegSeries := &chart.PolynomialRegressionSeries{ 24 | Degree: 3, 25 | InnerSeries: mainSeries, 26 | } 27 | 28 | graph := chart.Chart{ 29 | Series: []chart.Series{ 30 | mainSeries, 31 | polyRegSeries, 32 | }, 33 | } 34 | 35 | res.Header().Set("Content-Type", "image/png") 36 | graph.Render(chart.PNG, res) 37 | } 38 | 39 | func main() { 40 | http.HandleFunc("/", drawChart) 41 | http.ListenAndServe(":8080", nil) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/text_rotation/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | "github.com/wcharczuk/go-chart/drawing" 8 | ) 9 | 10 | func drawChart(res http.ResponseWriter, req *http.Request) { 11 | f, _ := chart.GetDefaultFont() 12 | r, _ := chart.PNG(1024, 1024) 13 | 14 | chart.Draw.Text(r, "Test", 64, 64, chart.Style{ 15 | FontColor: drawing.ColorBlack, 16 | FontSize: 18, 17 | Font: f, 18 | }) 19 | 20 | chart.Draw.Text(r, "Test", 64, 64, chart.Style{ 21 | FontColor: drawing.ColorBlack, 22 | FontSize: 18, 23 | Font: f, 24 | TextRotationDegrees: 45.0, 25 | }) 26 | 27 | tb := chart.Draw.MeasureText(r, "Test", chart.Style{ 28 | FontColor: drawing.ColorBlack, 29 | FontSize: 18, 30 | Font: f, 31 | }).Shift(64, 64) 32 | 33 | tbc := tb.Corners().Rotate(45) 34 | 35 | chart.Draw.BoxCorners(r, tbc, chart.Style{ 36 | StrokeColor: drawing.ColorRed, 37 | StrokeWidth: 2, 38 | }) 39 | 40 | tbcb := tbc.Box() 41 | chart.Draw.Box(r, tbcb, chart.Style{ 42 | StrokeColor: drawing.ColorBlue, 43 | StrokeWidth: 2, 44 | }) 45 | 46 | res.Header().Set("Content-Type", "image/png") 47 | r.Save(res) 48 | } 49 | 50 | func main() { 51 | http.HandleFunc("/", drawChart) 52 | http.ListenAndServe(":8080", nil) 53 | } 54 | -------------------------------------------------------------------------------- /vendor/github.com/unrolled/render/render_data_test.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | ) 8 | 9 | func TestDataBinaryBasic(t *testing.T) { 10 | render := New(Options{ 11 | // nothing here to configure 12 | }) 13 | 14 | var err error 15 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 16 | err = render.Data(w, 299, []byte("hello there")) 17 | }) 18 | 19 | res := httptest.NewRecorder() 20 | req, _ := http.NewRequest("GET", "/foo", nil) 21 | h.ServeHTTP(res, req) 22 | 23 | expectNil(t, err) 24 | expect(t, res.Code, 299) 25 | expect(t, res.Header().Get(ContentType), ContentBinary) 26 | expect(t, res.Body.String(), "hello there") 27 | } 28 | 29 | func TestDataCustomMimeType(t *testing.T) { 30 | render := New(Options{ 31 | // nothing here to configure 32 | }) 33 | 34 | var err error 35 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 36 | w.Header().Set(ContentType, "image/jpeg") 37 | err = render.Data(w, http.StatusOK, []byte("..jpeg data..")) 38 | }) 39 | 40 | res := httptest.NewRecorder() 41 | req, _ := http.NewRequest("GET", "/foo", nil) 42 | h.ServeHTTP(res, req) 43 | 44 | expectNil(t, err) 45 | expect(t, res.Code, http.StatusOK) 46 | expect(t, res.Header().Get(ContentType), "image/jpeg") 47 | expect(t, res.Body.String(), "..jpeg data..") 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/util/file_util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "os" 7 | ) 8 | 9 | var ( 10 | // File contains file utility functions 11 | File = fileUtil{} 12 | ) 13 | 14 | type fileUtil struct{} 15 | 16 | // ReadByLines reads a file and calls the handler for each line. 17 | func (fu fileUtil) ReadByLines(filePath string, handler func(line string) error) error { 18 | var f *os.File 19 | var err error 20 | if f, err = os.Open(filePath); err == nil { 21 | defer f.Close() 22 | var line string 23 | scanner := bufio.NewScanner(f) 24 | for scanner.Scan() { 25 | line = scanner.Text() 26 | err = handler(line) 27 | if err != nil { 28 | return err 29 | } 30 | } 31 | } 32 | return err 33 | 34 | } 35 | 36 | // ReadByChunks reads a file in `chunkSize` pieces, dispatched to the handler. 37 | func (fu fileUtil) ReadByChunks(filePath string, chunkSize int, handler func(line []byte) error) error { 38 | var f *os.File 39 | var err error 40 | if f, err = os.Open(filePath); err == nil { 41 | defer f.Close() 42 | 43 | chunk := make([]byte, chunkSize) 44 | for { 45 | readBytes, err := f.Read(chunk) 46 | if err == io.EOF { 47 | break 48 | } 49 | readData := chunk[:readBytes] 50 | err = handler(readData) 51 | if err != nil { 52 | return err 53 | } 54 | } 55 | } 56 | return err 57 | } 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/font/inconsolata/inconsolata.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate genbasicfont -size=16 -pkg=inconsolata -hinting=full -var=regular8x16 -fontfile=http://www.levien.com/type/myfonts/inconsolata/InconsolataGo-Regular.ttf 6 | //go:generate genbasicfont -size=16 -pkg=inconsolata -hinting=full -var=bold8x16 -fontfile=http://www.levien.com/type/myfonts/inconsolata/InconsolataGo-Bold.ttf 7 | 8 | // The genbasicfont program is github.com/golang/freetype/example/genbasicfont 9 | 10 | // Package inconsolata provides pre-rendered bitmap versions of the Inconsolata 11 | // font family. 12 | // 13 | // Inconsolata is copyright Raph Levien and Cyreal. This package is licensed 14 | // under Go's BSD-style license (https://golang.org/LICENSE) with their 15 | // permission. 16 | // 17 | // Inconsolata's home page is at 18 | // http://www.levien.com/type/myfonts/inconsolata.html 19 | package inconsolata // import "golang.org/x/image/font/inconsolata" 20 | 21 | import ( 22 | "golang.org/x/image/font/basicfont" 23 | ) 24 | 25 | // Regular8x16 is a regular weight, 8x16 font face. 26 | var Regular8x16 *basicfont.Face = ®ular8x16 27 | 28 | // Bold8x16 is a bold weight, 8x16 font face. 29 | var Bold8x16 *basicfont.Face = &bold8x16 30 | -------------------------------------------------------------------------------- /glide.lock: -------------------------------------------------------------------------------- 1 | hash: 6f4b00661fd62e39cad3c268cdad8785b691200fb8ae09e47a8297d2b0189a31 2 | updated: 2017-07-19T14:47:35.677815172+08:00 3 | imports: 4 | - name: github.com/blendlabs/go-exception 5 | version: d3934f941cb001f2b61a69b25dbc76eab3e6ff29 6 | - name: github.com/blendlabs/go-util 7 | version: 6564ff05cc50b880cde8fa1d4265e7ee3a4aba68 8 | - name: github.com/codegangsta/negroni 9 | version: aac393b02b969df303449ed8ae194a1f8f3b48d6 10 | - name: github.com/golang/freetype 11 | version: e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4 12 | subpackages: 13 | - raster 14 | - truetype 15 | - name: github.com/gorilla/context 16 | version: a8d44e7d8e4d532b6a27a02dd82abb31cc1b01bd 17 | - name: github.com/gorilla/mux 18 | version: 9c19ed558d5df4da88e2ade9c8940d742aef0e7e 19 | - name: github.com/rootsongjc/k8s-app-monitor-test 20 | version: c5cc23e23cc4bfbae6bcf616fd77ba366dd6d594 21 | subpackages: 22 | - service 23 | - name: github.com/unrolled/render 24 | version: 198ad4d8b8a4612176b804ca10555b222a086b40 25 | - name: github.com/wcharczuk/go-chart 26 | version: a0ea0129036c613675742b96f051df3a1a08821f 27 | subpackages: 28 | - drawing 29 | - matrix 30 | - roboto 31 | - seq 32 | - util 33 | - name: golang.org/x/image 34 | version: 426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d 35 | subpackages: 36 | - draw 37 | - font 38 | - math/f64 39 | - math/fixed 40 | testImports: [] 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/tiff/compress.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package tiff 6 | 7 | import ( 8 | "bufio" 9 | "io" 10 | ) 11 | 12 | type byteReader interface { 13 | io.Reader 14 | io.ByteReader 15 | } 16 | 17 | // unpackBits decodes the PackBits-compressed data in src and returns the 18 | // uncompressed data. 19 | // 20 | // The PackBits compression format is described in section 9 (p. 42) 21 | // of the TIFF spec. 22 | func unpackBits(r io.Reader) ([]byte, error) { 23 | buf := make([]byte, 128) 24 | dst := make([]byte, 0, 1024) 25 | br, ok := r.(byteReader) 26 | if !ok { 27 | br = bufio.NewReader(r) 28 | } 29 | 30 | for { 31 | b, err := br.ReadByte() 32 | if err != nil { 33 | if err == io.EOF { 34 | return dst, nil 35 | } 36 | return nil, err 37 | } 38 | code := int(int8(b)) 39 | switch { 40 | case code >= 0: 41 | n, err := io.ReadFull(br, buf[:code+1]) 42 | if err != nil { 43 | return nil, err 44 | } 45 | dst = append(dst, buf[:n]...) 46 | case code == -128: 47 | // No-op. 48 | default: 49 | if b, err = br.ReadByte(); err != nil { 50 | return nil, err 51 | } 52 | for j := 0; j < 1-code; j++ { 53 | buf[j] = b 54 | } 55 | dst = append(dst, buf[:1-code]...) 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/format.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | // Format is a singleton namespace with utilties for formatting common values. 9 | var Format formatUtil 10 | 11 | type formatUtil struct{} 12 | 13 | // Percent returns a value in the format 0.00%. 14 | func (fu formatUtil) Percent(value float64) string { 15 | return fmt.Sprintf("%0.2f%%", value+100.0) 16 | } 17 | 18 | // Money returns a typical dollar ammount representation for a float. 19 | func (fu formatUtil) Money(value float64) string { 20 | return fmt.Sprintf("%.2f", value) 21 | } 22 | 23 | // DateUTC returns a date formatted by `2006-01-02Z`. 24 | func (fu formatUtil) DateUTC(t time.Time) string { 25 | return t.UTC().Format("2006-01-02Z") 26 | } 27 | 28 | // DateTimeUTC returns a date and time formatted by RFC3339 tweaked slightly. 29 | func (fu formatUtil) DateTimeUTC(t time.Time) string { 30 | return t.Format("2006-01-02T15:04:05Z") 31 | } 32 | 33 | // FormatFileSize returns a string representation of a file size in bytes. 34 | func (fu formatUtil) FileSize(sizeBytes int) string { 35 | if sizeBytes >= 1<<30 { 36 | return fmt.Sprintf("%dgB", sizeBytes/(1<<30)) 37 | } else if sizeBytes >= 1<<20 { 38 | return fmt.Sprintf("%dmB", sizeBytes/(1<<20)) 39 | } else if sizeBytes >= 1<<10 { 40 | return fmt.Sprintf("%dkB", sizeBytes/(1<<10)) 41 | } 42 | return fmt.Sprintf("%dB", sizeBytes) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/blendlabs/go-util/vector.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "errors" 5 | "math" 6 | ) 7 | 8 | var ( 9 | // Vector is a namespace for vector functions. 10 | Vector = vectorUtil{} 11 | ) 12 | 13 | type vectorUtil struct{} 14 | 15 | // MultiplyByElement multiplies two slices elementwise. 16 | func (vu vectorUtil) MultiplyByElement(a []float64, b []float64) ([]float64, error) { 17 | if len(a) != len(b) { 18 | return nil, errors.New("Arrays must be the same length for element multiplication") 19 | } 20 | 21 | result := make([]float64, len(a)) 22 | for i := range a { 23 | result[i] = a[i] * b[i] 24 | } 25 | 26 | return result, nil 27 | } 28 | 29 | // Normalize normalizes a slice, if it is a zero vector, we return a vector of same size with an error. 30 | func (vu vectorUtil) Normalize(input []float64) ([]float64, error) { 31 | if len(input) == 0 { 32 | return input, nil 33 | } 34 | 35 | result := make([]float64, len(input)) 36 | m := vu.GetMagnitude(input) 37 | if Math.InEpsilon(m, 0) { 38 | return result, errors.New("zero vector") 39 | } 40 | for i := range input { 41 | result[i] = input[i] / m 42 | } 43 | 44 | return result, nil 45 | } 46 | 47 | // Magnitude returns the magnitude of a vector. 48 | func (vu vectorUtil) GetMagnitude(a []float64) float64 { 49 | sum := float64(0) 50 | for _, elem := range a { 51 | sum += elem * elem 52 | } 53 | return math.Sqrt(sum) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/drawing/color_test.go: -------------------------------------------------------------------------------- 1 | package drawing 2 | 3 | import ( 4 | "testing" 5 | 6 | "image/color" 7 | 8 | "github.com/blendlabs/go-assert" 9 | ) 10 | 11 | func TestColorFromHex(t *testing.T) { 12 | assert := assert.New(t) 13 | 14 | white := ColorFromHex("FFFFFF") 15 | assert.Equal(ColorWhite, white) 16 | 17 | shortWhite := ColorFromHex("FFF") 18 | assert.Equal(ColorWhite, shortWhite) 19 | 20 | black := ColorFromHex("000000") 21 | assert.Equal(ColorBlack, black) 22 | 23 | shortBlack := ColorFromHex("000") 24 | assert.Equal(ColorBlack, shortBlack) 25 | 26 | red := ColorFromHex("FF0000") 27 | assert.Equal(ColorRed, red) 28 | 29 | shortRed := ColorFromHex("F00") 30 | assert.Equal(ColorRed, shortRed) 31 | 32 | green := ColorFromHex("00FF00") 33 | assert.Equal(ColorGreen, green) 34 | 35 | shortGreen := ColorFromHex("0F0") 36 | assert.Equal(ColorGreen, shortGreen) 37 | 38 | blue := ColorFromHex("0000FF") 39 | assert.Equal(ColorBlue, blue) 40 | 41 | shortBlue := ColorFromHex("00F") 42 | assert.Equal(ColorBlue, shortBlue) 43 | } 44 | 45 | func TestColorFromAlphaMixedRGBA(t *testing.T) { 46 | assert := assert.New(t) 47 | 48 | black := ColorFromAlphaMixedRGBA(color.Black.RGBA()) 49 | assert.True(black.Equals(ColorBlack), black.String()) 50 | 51 | white := ColorFromAlphaMixedRGBA(color.White.RGBA()) 52 | assert.True(white.Equals(ColorWhite), white.String()) 53 | } 54 | -------------------------------------------------------------------------------- /vendor/github.com/rootsongjc/k8s-app-monitor-test/vendor/github.com/unrolled/render/render_data_test.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | ) 8 | 9 | func TestDataBinaryBasic(t *testing.T) { 10 | render := New(Options{ 11 | // nothing here to configure 12 | }) 13 | 14 | var err error 15 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 16 | err = render.Data(w, 299, []byte("hello there")) 17 | }) 18 | 19 | res := httptest.NewRecorder() 20 | req, _ := http.NewRequest("GET", "/foo", nil) 21 | h.ServeHTTP(res, req) 22 | 23 | expectNil(t, err) 24 | expect(t, res.Code, 299) 25 | expect(t, res.Header().Get(ContentType), ContentBinary) 26 | expect(t, res.Body.String(), "hello there") 27 | } 28 | 29 | func TestDataCustomMimeType(t *testing.T) { 30 | render := New(Options{ 31 | // nothing here to configure 32 | }) 33 | 34 | var err error 35 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 36 | w.Header().Set(ContentType, "image/jpeg") 37 | err = render.Data(w, http.StatusOK, []byte("..jpeg data..")) 38 | }) 39 | 40 | res := httptest.NewRecorder() 41 | req, _ := http.NewRequest("GET", "/foo", nil) 42 | h.ServeHTTP(res, req) 43 | 44 | expectNil(t, err) 45 | expect(t, res.Code, http.StatusOK) 46 | expect(t, res.Header().Get(ContentType), "image/jpeg") 47 | expect(t, res.Body.String(), "..jpeg data..") 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/market_hours/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | "github.com/wcharczuk/go-chart/seq" 8 | "github.com/wcharczuk/go-chart/util" 9 | ) 10 | 11 | func drawChart(res http.ResponseWriter, req *http.Request) { 12 | start := util.Date.Date(2016, 7, 01, util.Date.Eastern()) 13 | end := util.Date.Date(2016, 07, 21, util.Date.Eastern()) 14 | xv := seq.Time.MarketHours(start, end, util.NYSEOpen(), util.NYSEClose(), util.Date.IsNYSEHoliday) 15 | yv := seq.New(seq.NewRandom().WithLen(len(xv)).WithAverage(200).WithScale(10)).Array() 16 | 17 | graph := chart.Chart{ 18 | XAxis: chart.XAxis{ 19 | Style: chart.StyleShow(), 20 | TickPosition: chart.TickPositionBetweenTicks, 21 | ValueFormatter: chart.TimeHourValueFormatter, 22 | Range: &chart.MarketHoursRange{ 23 | MarketOpen: util.NYSEOpen(), 24 | MarketClose: util.NYSEClose(), 25 | HolidayProvider: util.Date.IsNYSEHoliday, 26 | }, 27 | }, 28 | YAxis: chart.YAxis{ 29 | Style: chart.StyleShow(), 30 | }, 31 | Series: []chart.Series{ 32 | chart.TimeSeries{ 33 | XValues: xv, 34 | YValues: yv, 35 | }, 36 | }, 37 | } 38 | 39 | res.Header().Set("Content-Type", "image/png") 40 | graph.Render(chart.PNG, res) 41 | } 42 | 43 | func main() { 44 | http.HandleFunc("/", drawChart) 45 | http.ListenAndServe(":8080", nil) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/colornames/colornames_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package colornames 6 | 7 | import ( 8 | "image/color" 9 | "testing" 10 | ) 11 | 12 | func TestColornames(t *testing.T) { 13 | if len(Map) != len(Names) { 14 | t.Fatalf("Map and Names have different length: %d vs %d", len(Map), len(Names)) 15 | } 16 | 17 | for name, want := range testCases { 18 | got, ok := Map[name] 19 | if !ok { 20 | t.Errorf("Did not find %s", name) 21 | continue 22 | } 23 | if got != want { 24 | t.Errorf("%s:\ngot %v\nwant %v", name, got, want) 25 | } 26 | } 27 | } 28 | 29 | var testCases = map[string]color.RGBA{ 30 | "aliceblue": color.RGBA{240, 248, 255, 255}, 31 | "crimson": color.RGBA{220, 20, 60, 255}, 32 | "darkorange": color.RGBA{255, 140, 0, 255}, 33 | "deepskyblue": color.RGBA{0, 191, 255, 255}, 34 | "greenyellow": color.RGBA{173, 255, 47, 255}, 35 | "lightgrey": color.RGBA{211, 211, 211, 255}, 36 | "lightpink": color.RGBA{255, 182, 193, 255}, 37 | "mediumseagreen": color.RGBA{60, 179, 113, 255}, 38 | "olivedrab": color.RGBA{107, 142, 35, 255}, 39 | "purple": color.RGBA{128, 0, 128, 255}, 40 | "slategrey": color.RGBA{112, 128, 144, 255}, 41 | "yellowgreen": color.RGBA{154, 205, 50, 255}, 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/_examples/axes/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/wcharczuk/go-chart" 7 | ) 8 | 9 | func drawChart(res http.ResponseWriter, req *http.Request) { 10 | 11 | /* 12 | The below will draw the same chart as the `basic` example, except with both the x and y axes turned on. 13 | In this case, both the x and y axis ticks are generated automatically, the x and y ranges are established automatically, the canvas "box" is adjusted to fit the space the axes occupy so as not to clip. 14 | */ 15 | 16 | graph := chart.Chart{ 17 | XAxis: chart.XAxis{ 18 | Style: chart.Style{ 19 | Show: true, //enables / displays the x-axis 20 | }, 21 | }, 22 | YAxis: chart.YAxis{ 23 | Style: chart.Style{ 24 | Show: true, //enables / displays the y-axis 25 | }, 26 | }, 27 | Series: []chart.Series{ 28 | chart.ContinuousSeries{ 29 | Style: chart.Style{ 30 | Show: true, 31 | StrokeColor: chart.GetDefaultColor(0).WithAlpha(64), 32 | FillColor: chart.GetDefaultColor(0).WithAlpha(64), 33 | }, 34 | XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 35 | YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, 36 | }, 37 | }, 38 | } 39 | 40 | res.Header().Set("Content-Type", "image/png") 41 | graph.Render(chart.PNG, res) 42 | } 43 | 44 | func main() { 45 | http.HandleFunc("/", drawChart) 46 | http.ListenAndServe(":8080", nil) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/image/webp/webp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package webp implements a decoder for WEBP images. 6 | // 7 | // WEBP is defined at: 8 | // https://developers.google.com/speed/webp/docs/riff_container 9 | // 10 | // It requires Go 1.6 or later. 11 | package webp // import "golang.org/x/image/webp" 12 | 13 | // This blank Go file, other than the package clause, exists so that this 14 | // package can be built for Go 1.5 and earlier. (The other files in this 15 | // package are all marked "+build go1.6" for the NYCbCrA types introduced in Go 16 | // 1.6). There is no functionality in a blank package, but some image 17 | // manipulation programs might still underscore import this package for the 18 | // side effect of registering the WEBP format with the standard library's 19 | // image.RegisterFormat and image.Decode functions. For example, that program 20 | // might contain: 21 | // 22 | // // Underscore imports to register some formats for image.Decode. 23 | // import _ "image/gif" 24 | // import _ "image/jpeg" 25 | // import _ "image/png" 26 | // import _ "golang.org/x/image/webp" 27 | // 28 | // Such a program will still compile for Go 1.5 (due to this placeholder Go 29 | // file). It will simply not be able to recognize and decode WEBP (but still 30 | // handle GIF, JPEG and PNG). 31 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/recovery_test.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func TestRecovery(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | rec := NewRecovery() 16 | rec.Logger = log.New(buff, "[negroni] ", 0) 17 | 18 | n := New() 19 | // replace log for testing 20 | n.Use(rec) 21 | n.UseHandler(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { 22 | panic("here is a panic!") 23 | })) 24 | n.ServeHTTP(recorder, (*http.Request)(nil)) 25 | expect(t, recorder.Header().Get("Content-Type"), "text/plain; charset=utf-8") 26 | expect(t, recorder.Code, http.StatusInternalServerError) 27 | refute(t, recorder.Body.Len(), 0) 28 | refute(t, len(buff.String()), 0) 29 | } 30 | 31 | func TestRecovery_noContentTypeOverwrite(t *testing.T) { 32 | recorder := httptest.NewRecorder() 33 | 34 | rec := NewRecovery() 35 | rec.Logger = log.New(bytes.NewBuffer([]byte{}), "[negroni] ", 0) 36 | 37 | n := New() 38 | n.Use(rec) 39 | n.UseHandler(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { 40 | res.Header().Set("Content-Type", "application/javascript; charset=utf-8") 41 | panic("here is a panic!") 42 | })) 43 | n.ServeHTTP(recorder, (*http.Request)(nil)) 44 | expect(t, recorder.Header().Get("Content-Type"), "application/javascript; charset=utf-8") 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/wcharczuk/go-chart/tick_test.go: -------------------------------------------------------------------------------- 1 | package chart 2 | 3 | import ( 4 | "testing" 5 | 6 | assert "github.com/blendlabs/go-assert" 7 | ) 8 | 9 | func TestGenerateContinuousTicks(t *testing.T) { 10 | assert := assert.New(t) 11 | 12 | f, err := GetDefaultFont() 13 | assert.Nil(err) 14 | 15 | r, err := PNG(1024, 1024) 16 | assert.Nil(err) 17 | r.SetFont(f) 18 | 19 | ra := &ContinuousRange{ 20 | Min: 0.0, 21 | Max: 10.0, 22 | Domain: 256, 23 | } 24 | 25 | vf := FloatValueFormatter 26 | 27 | ticks := GenerateContinuousTicks(r, ra, false, Style{}, vf) 28 | assert.NotEmpty(ticks) 29 | assert.Len(ticks, 11) 30 | assert.Equal(0.0, ticks[0].Value) 31 | assert.Equal(10, ticks[len(ticks)-1].Value) 32 | } 33 | 34 | func TestGenerateContinuousTicksDescending(t *testing.T) { 35 | assert := assert.New(t) 36 | 37 | f, err := GetDefaultFont() 38 | assert.Nil(err) 39 | 40 | r, err := PNG(1024, 1024) 41 | assert.Nil(err) 42 | r.SetFont(f) 43 | 44 | ra := &ContinuousRange{ 45 | Min: 0.0, 46 | Max: 10.0, 47 | Domain: 256, 48 | Descending: true, 49 | } 50 | 51 | vf := FloatValueFormatter 52 | 53 | ticks := GenerateContinuousTicks(r, ra, false, Style{}, vf) 54 | assert.NotEmpty(ticks) 55 | assert.Len(ticks, 11) 56 | assert.Equal(10.0, ticks[0].Value) 57 | assert.Equal(9.0, ticks[1].Value) 58 | assert.Equal(1.0, ticks[len(ticks)-2].Value) 59 | assert.Equal(0.0, ticks[len(ticks)-1].Value) 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/recovery.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | "os" 8 | "runtime" 9 | ) 10 | 11 | // Recovery is a Negroni middleware that recovers from any panics and writes a 500 if there was one. 12 | type Recovery struct { 13 | Logger *log.Logger 14 | PrintStack bool 15 | ErrorHandlerFunc func(interface{}) 16 | StackAll bool 17 | StackSize int 18 | } 19 | 20 | // NewRecovery returns a new instance of Recovery 21 | func NewRecovery() *Recovery { 22 | return &Recovery{ 23 | Logger: log.New(os.Stdout, "[negroni] ", 0), 24 | PrintStack: true, 25 | StackAll: false, 26 | StackSize: 1024 * 8, 27 | } 28 | } 29 | 30 | func (rec *Recovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 31 | defer func() { 32 | if err := recover(); err != nil { 33 | if rw.Header().Get("Content-Type") == "" { 34 | rw.Header().Set("Content-Type", "text/plain; charset=utf-8") 35 | } 36 | 37 | rw.WriteHeader(http.StatusInternalServerError) 38 | stack := make([]byte, rec.StackSize) 39 | stack = stack[:runtime.Stack(stack, rec.StackAll)] 40 | 41 | f := "PANIC: %s\n%s" 42 | rec.Logger.Printf(f, err, stack) 43 | 44 | if rec.PrintStack { 45 | fmt.Fprintf(rw, f, err, stack) 46 | } 47 | 48 | if rec.ErrorHandlerFunc != nil { 49 | rec.ErrorHandlerFunc(err) 50 | } 51 | } 52 | }() 53 | 54 | next(rw, r) 55 | } 56 | -------------------------------------------------------------------------------- /chart/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range .Values.ingress.hosts }} 4 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} 5 | {{- end }} 6 | {{- else if contains "NodePort" .Values.service.type }} 7 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "chart.fullname" . }}) 8 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 9 | echo http://$NODE_IP:$NODE_PORT 10 | {{- else if contains "LoadBalancer" .Values.service.type }} 11 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 12 | You can watch the status of by running 'kubectl get svc -w {{ template "chart.fullname" . }}' 13 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "chart.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 14 | echo http://$SERVICE_IP:{{ .Values.service.port }} 15 | {{- else if contains "ClusterIP" .Values.service.type }} 16 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "chart.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 17 | echo "Visit http://127.0.0.1:8080 to use your application" 18 | kubectl port-forward $POD_NAME 8080:80 19 | {{- end }} 20 | --------------------------------------------------------------------------------