lol

Merge pull request #177081 from azahi/trickster

trickster: 0.1.10 -> 1.1.5

authored by

Lassulus and committed by
GitHub
8c2e25e9 ef61c5e0

+56 -254
+16 -4
nixos/modules/services/networking/trickster.nix
··· 6 6 cfg = config.services.trickster; 7 7 in 8 8 { 9 + imports = [ 10 + (mkRenamedOptionModule [ "services" "trickster" "origin" ] [ "services" "trickster" "origin-url" ]) 11 + ]; 9 12 10 13 options = { 11 14 services.trickster = { ··· 58 61 ''; 59 62 }; 60 63 61 - origin = mkOption { 64 + origin-type = mkOption { 65 + type = types.enum [ "prometheus" "influxdb" ]; 66 + default = "prometheus"; 67 + description = '' 68 + Type of origin (prometheus, influxdb) 69 + ''; 70 + }; 71 + 72 + origin-url = mkOption { 62 73 type = types.str; 63 74 default = "http://prometheus:9090"; 64 75 description = '' 65 - URL to the Prometheus Origin. Enter it like you would in grafana, e.g., http://prometheus:9090 (default http://prometheus:9090). 76 + URL to the Origin. Enter it like you would in grafana, e.g., http://prometheus:9090 (default http://prometheus:9090). 66 77 ''; 67 78 }; 68 79 ··· 87 98 88 99 config = mkIf cfg.enable { 89 100 systemd.services.trickster = { 90 - description = "Dashboard Accelerator for Prometheus"; 101 + description = "Reverse proxy cache and time series dashboard accelerator"; 91 102 after = [ "network.target" ]; 92 103 wantedBy = [ "multi-user.target" ]; 93 104 serviceConfig = { ··· 96 107 ${cfg.package}/bin/trickster \ 97 108 -log-level ${cfg.log-level} \ 98 109 -metrics-port ${toString cfg.metrics-port} \ 99 - -origin ${cfg.origin} \ 110 + -origin-type ${cfg.origin-type} \ 111 + -origin-url ${cfg.origin-url} \ 100 112 -proxy-port ${toString cfg.proxy-port} \ 101 113 ${optionalString (cfg.configFile != null) "-config ${cfg.configFile}"} \ 102 114 ${optionalString (cfg.profiler-port != null) "-profiler-port ${cfg.profiler-port}"} \
+40 -13
pkgs/servers/trickster/trickster.nix
··· 1 - { lib, buildGoPackage, fetchFromGitHub }: 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + }: 2 5 3 - buildGoPackage rec { 6 + buildGoModule rec { 4 7 pname = "trickster"; 5 - version = "0.1.10"; 6 - 7 - goPackagePath = "github.com/Comcast/trickster"; 8 - 9 - goDeps = ./trickster_deps.nix; 8 + version = "1.1.5"; 9 + rev = "4595bd6a1ae1165ef497251ad85c646dadc8a925"; 10 10 11 11 src = fetchFromGitHub { 12 - owner = "Comcast"; 13 - repo = pname; 12 + owner = "trickstercache"; 13 + repo = "trickster"; 14 14 rev = "v${version}"; 15 - sha256 = "12z71rf03g2x8r7cgns0n4n46r0gjsfyig6z9r5xrn9kfghabfi8"; 15 + sha256 = "sha256-BRD8IF3s9RaDorVtXRvbKLVVVXWiEQTQyKBR9jFo1eM="; 16 16 }; 17 17 18 - doCheck = true; 18 + vendorSha256 = null; 19 + 20 + subPackages = [ "cmd/trickster" ]; 21 + 22 + preBuild = 23 + let 24 + ldflags = with lib; 25 + concatStringsSep " " ( 26 + [ "-extldflags '-static'" "-s" "-w" ] ++ 27 + (mapAttrsToList (n: v: "-X main.application${n}=${v}") { 28 + BuildTime = "1970-01-01T00:00:00+0000"; 29 + GitCommitID = rev; 30 + GoVersion = "$(go env GOVERSION)"; 31 + GoArch = "$(go env GOARCH)"; 32 + }) 33 + ); 34 + in 35 + '' 36 + buildFlagsArray+=("-ldflags=${ldflags}") 37 + ''; 38 + 39 + # Tests are broken. 40 + doCheck = false; 19 41 20 42 meta = with lib; { 21 - description = "Reverse proxy cache for the Prometheus HTTP APIv1"; 22 - homepage = "https://github.com/Comcast/trickster"; 43 + description = "Reverse proxy cache and time series dashboard accelerator"; 44 + longDescription = '' 45 + Trickster is a fully-featured HTTP Reverse Proxy Cache for HTTP 46 + applications like static file servers and web APIs. 47 + ''; 48 + homepage = "https://trickstercache.org/"; 23 49 license = licenses.asl20; 24 50 maintainers = with maintainers; [ _1000101 ]; 51 + platforms = platforms.linux; 25 52 }; 26 53 }
-237
pkgs/servers/trickster/trickster_deps.nix
··· 1 - # file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) 2 - [ 3 - { 4 - goPackagePath = "github.com/BurntSushi/toml"; 5 - fetch = { 6 - type = "git"; 7 - url = "https://github.com/BurntSushi/toml"; 8 - rev = "v0.3.1"; 9 - sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; 10 - }; 11 - } 12 - { 13 - goPackagePath = "github.com/alicebob/gopher-json"; 14 - fetch = { 15 - type = "git"; 16 - url = "https://github.com/alicebob/gopher-json"; 17 - rev = "5a6b3ba71ee6"; 18 - sha256 = "0hx6n722zq51p852lv56k39yjy09lw6mnr2c3x0p23rfyyrakj2p"; 19 - }; 20 - } 21 - { 22 - goPackagePath = "github.com/alicebob/miniredis"; 23 - fetch = { 24 - type = "git"; 25 - url = "https://github.com/alicebob/miniredis"; 26 - rev = "cfad8aca71cc"; 27 - sha256 = "0x2401nxyhdz037lj98c0sa77d8k49jfcq7is3ddiyim3csg5a0w"; 28 - }; 29 - } 30 - { 31 - goPackagePath = "github.com/beorn7/perks"; 32 - fetch = { 33 - type = "git"; 34 - url = "https://github.com/beorn7/perks"; 35 - rev = "3a771d992973"; 36 - sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; 37 - }; 38 - } 39 - { 40 - goPackagePath = "github.com/chzyer/readline"; 41 - fetch = { 42 - type = "git"; 43 - url = "https://github.com/chzyer/readline"; 44 - rev = "2972be24d48e"; 45 - sha256 = "104q8dazj8yf6b089jjr82fy9h1g80zyyzvp3g8b44a7d8ngjj6r"; 46 - }; 47 - } 48 - { 49 - goPackagePath = "github.com/coreos/bbolt"; 50 - fetch = { 51 - type = "git"; 52 - url = "https://github.com/coreos/bbolt"; 53 - rev = "v1.3.0"; 54 - sha256 = "0cp5v9iypg9ysiq40k3h3lg7aisxplnmxshha7nama6b170izyay"; 55 - }; 56 - } 57 - { 58 - goPackagePath = "github.com/go-kit/kit"; 59 - fetch = { 60 - type = "git"; 61 - url = "https://github.com/go-kit/kit"; 62 - rev = "v0.8.0"; 63 - sha256 = "1rcywbc2pvab06qyf8pc2rdfjv7r6kxdv2v4wnpqnjhz225wqvc0"; 64 - }; 65 - } 66 - { 67 - goPackagePath = "github.com/go-logfmt/logfmt"; 68 - fetch = { 69 - type = "git"; 70 - url = "https://github.com/go-logfmt/logfmt"; 71 - rev = "v0.4.0"; 72 - sha256 = "06smxc112xmixz78nyvk3b2hmc7wasf2sl5vxj1xz62kqcq9lzm9"; 73 - }; 74 - } 75 - { 76 - goPackagePath = "github.com/go-redis/redis"; 77 - fetch = { 78 - type = "git"; 79 - url = "https://github.com/go-redis/redis"; 80 - rev = "v6.14.2"; 81 - sha256 = "0s1if96r8xnadan7pz1j8hvzk9g4fm3phwmwzadwpq21pgni66d7"; 82 - }; 83 - } 84 - { 85 - goPackagePath = "github.com/go-stack/stack"; 86 - fetch = { 87 - type = "git"; 88 - url = "https://github.com/go-stack/stack"; 89 - rev = "v1.8.0"; 90 - sha256 = "0wk25751ryyvxclyp8jdk5c3ar0cmfr8lrjb66qbg4808x66b96v"; 91 - }; 92 - } 93 - { 94 - goPackagePath = "github.com/golang/protobuf"; 95 - fetch = { 96 - type = "git"; 97 - url = "https://github.com/golang/protobuf"; 98 - rev = "v1.2.0"; 99 - sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab"; 100 - }; 101 - } 102 - { 103 - goPackagePath = "github.com/golang/snappy"; 104 - fetch = { 105 - type = "git"; 106 - url = "https://github.com/golang/snappy"; 107 - rev = "2e65f85255db"; 108 - sha256 = "05w6mpc4qcy0pv8a2bzng8nf4s5rf5phfang4jwy9rgf808q0nxf"; 109 - }; 110 - } 111 - { 112 - goPackagePath = "github.com/gomodule/redigo"; 113 - fetch = { 114 - type = "git"; 115 - url = "https://github.com/gomodule/redigo"; 116 - rev = "v2.0.0"; 117 - sha256 = "1kg7s8027b4g1sfw0v3nh30c15j407kv684s53gg281r807dnfpk"; 118 - }; 119 - } 120 - { 121 - goPackagePath = "github.com/gorilla/context"; 122 - fetch = { 123 - type = "git"; 124 - url = "https://github.com/gorilla/context"; 125 - rev = "v1.1.1"; 126 - sha256 = "03p4hn87vcmfih0p9w663qbx9lpsf7i7j3lc7yl7n84la3yz63m4"; 127 - }; 128 - } 129 - { 130 - goPackagePath = "github.com/gorilla/handlers"; 131 - fetch = { 132 - type = "git"; 133 - url = "https://github.com/gorilla/handlers"; 134 - rev = "v1.4.0"; 135 - sha256 = "0mnw81ayjm4d8462qg8spmcwxmchn24158bf93zxjab51pg8n9gm"; 136 - }; 137 - } 138 - { 139 - goPackagePath = "github.com/gorilla/mux"; 140 - fetch = { 141 - type = "git"; 142 - url = "https://github.com/gorilla/mux"; 143 - rev = "v1.6.2"; 144 - sha256 = "0pvzm23hklxysspnz52mih6h1q74vfrdhjfm1l3sa9r8hhqmmld2"; 145 - }; 146 - } 147 - { 148 - goPackagePath = "github.com/kr/logfmt"; 149 - fetch = { 150 - type = "git"; 151 - url = "https://github.com/kr/logfmt"; 152 - rev = "b84e30acd515"; 153 - sha256 = "02ldzxgznrfdzvghfraslhgp19la1fczcbzh7wm2zdc6lmpd1qq9"; 154 - }; 155 - } 156 - { 157 - goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; 158 - fetch = { 159 - type = "git"; 160 - url = "https://github.com/matttproud/golang_protobuf_extensions"; 161 - rev = "v1.0.1"; 162 - sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; 163 - }; 164 - } 165 - { 166 - goPackagePath = "github.com/pkg/errors"; 167 - fetch = { 168 - type = "git"; 169 - url = "https://github.com/pkg/errors"; 170 - rev = "v0.8.0"; 171 - sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5"; 172 - }; 173 - } 174 - { 175 - goPackagePath = "github.com/prometheus/client_golang"; 176 - fetch = { 177 - type = "git"; 178 - url = "https://github.com/prometheus/client_golang"; 179 - rev = "v0.9.1"; 180 - sha256 = "01gnylazia30pcp069xcng482gwmm3xcx5zgrlwdkhic1lyb6i9l"; 181 - }; 182 - } 183 - { 184 - goPackagePath = "github.com/prometheus/client_model"; 185 - fetch = { 186 - type = "git"; 187 - url = "https://github.com/prometheus/client_model"; 188 - rev = "5c3871d89910"; 189 - sha256 = "04psf81l9fjcwascsys428v03fx4fi894h7fhrj2vvcz723q57k0"; 190 - }; 191 - } 192 - { 193 - goPackagePath = "github.com/prometheus/common"; 194 - fetch = { 195 - type = "git"; 196 - url = "https://github.com/prometheus/common"; 197 - rev = "4724e9255275"; 198 - sha256 = "0pcx8hlnrxx5nnmpk786cn99rsgqk1jrd3c9f6fsx8qd8y5iwjy6"; 199 - }; 200 - } 201 - { 202 - goPackagePath = "github.com/prometheus/procfs"; 203 - fetch = { 204 - type = "git"; 205 - url = "https://github.com/prometheus/procfs"; 206 - rev = "1dc9a6cbc91a"; 207 - sha256 = "1zlv1x30xp7z5c3vn5vp870v4bjim0zcidzc3mr2l3xhazc0svab"; 208 - }; 209 - } 210 - { 211 - goPackagePath = "github.com/yuin/gopher-lua"; 212 - fetch = { 213 - type = "git"; 214 - url = "https://github.com/yuin/gopher-lua"; 215 - rev = "a0dfe84f6227"; 216 - sha256 = "13k2dphx4zv6fwgqsydsc0g0b0pf7qx3yb6i7hai6nnkh0db91nn"; 217 - }; 218 - } 219 - { 220 - goPackagePath = "golang.org/x/sys"; 221 - fetch = { 222 - type = "git"; 223 - url = "https://go.googlesource.com/sys"; 224 - rev = "a5c9d58dba9a"; 225 - sha256 = "02qv5i7yps35p7fa81345qz7k8i73gkigj69anwmpw9rhpmzayf9"; 226 - }; 227 - } 228 - { 229 - goPackagePath = "gopkg.in/natefinch/lumberjack.v2"; 230 - fetch = { 231 - type = "git"; 232 - url = "https://gopkg.in/natefinch/lumberjack.v2"; 233 - rev = "a96e63847dc3"; 234 - sha256 = "1l3vlv72b7rfkpy1164kwd3qzrqmmjnb67akzxqp2mlvc66k6p3d"; 235 - }; 236 - } 237 - ]