diff --git a/docs/dependencies.svg b/docs/dependencies.svg index 1c3f9bcb8..28e2be7fa 100644 --- a/docs/dependencies.svg +++ b/docs/dependencies.svg @@ -1,4348 +1,4348 @@ - - - + + %3 - + github.com/weaveworks/\nignite - -github.com/weaveworks/ -ignite + +github.com/weaveworks/ +ignite golang.org/x/sync -golang.org/x/sync +golang.org/x/sync github.com/weaveworks/\nignite->golang.org/x/sync - - + + google.golang.org/grpc -google.golang.org/grpc +google.golang.org/grpc github.com/weaveworks/\nignite->google.golang.org/grpc - - + + github.com/firecracker-microvm/\nfirecracker-go-sdk -github.com/firecracker-microvm/ -firecracker-go-sdk +github.com/firecracker-microvm/ +firecracker-go-sdk github.com/weaveworks/\nignite->github.com/firecracker-microvm/\nfirecracker-go-sdk - - + + github.com/sirupsen/\nlogrus -github.com/sirupsen/ -logrus +github.com/sirupsen/ +logrus github.com/weaveworks/\nignite->github.com/sirupsen/\nlogrus - - + + github.com/go-openapi/\nspec -github.com/go-openapi/ -spec +github.com/go-openapi/ +spec github.com/weaveworks/\nignite->github.com/go-openapi/\nspec - - + + github.com/pkg/\nerrors -github.com/pkg/ -errors +github.com/pkg/ +errors github.com/weaveworks/\nignite->github.com/pkg/\nerrors - - + + github.com/spf13/\npflag -github.com/spf13/ -pflag +github.com/spf13/ +pflag github.com/weaveworks/\nignite->github.com/spf13/\npflag - - + + k8s.io/apimachinery -k8s.io/apimachinery +k8s.io/apimachinery github.com/weaveworks/\nignite->k8s.io/apimachinery - - + + k8s.io/kube-openapi -k8s.io/kube-openapi +k8s.io/kube-openapi github.com/weaveworks/\nignite->k8s.io/kube-openapi - - + + sigs.k8s.io/yaml -sigs.k8s.io/yaml +sigs.k8s.io/yaml github.com/weaveworks/\nignite->sigs.k8s.io/yaml - - + + github.com/gorilla/\nmux -github.com/gorilla/ -mux +github.com/gorilla/ +mux github.com/weaveworks/\nignite->github.com/gorilla/\nmux - - + + github.com/prometheus/\nclient_golang -github.com/prometheus/ -client_golang +github.com/prometheus/ +client_golang github.com/weaveworks/\nignite->github.com/prometheus/\nclient_golang - - + + github.com/spf13/\ncobra -github.com/spf13/ -cobra +github.com/spf13/ +cobra github.com/weaveworks/\nignite->github.com/spf13/\ncobra - - + + github.com/weaveworks/\nflux -github.com/weaveworks/ -flux +github.com/weaveworks/ +flux github.com/weaveworks/\nignite->github.com/weaveworks/\nflux - - + + github.com/docker/\ndistribution -github.com/docker/ -distribution +github.com/docker/ +distribution github.com/weaveworks/\nignite->github.com/docker/\ndistribution - - + + github.com/Azure/\ngo-ansiterm -github.com/Azure/ -go-ansiterm +github.com/Azure/ +go-ansiterm github.com/weaveworks/\nignite->github.com/Azure/\ngo-ansiterm - - + + github.com/c2h5oh/\ndatasize -github.com/c2h5oh/ -datasize +github.com/c2h5oh/ +datasize github.com/weaveworks/\nignite->github.com/c2h5oh/\ndatasize - - + + github.com/containernetworking/\ncni -github.com/containernetworking/ -cni +github.com/containernetworking/ +cni github.com/weaveworks/\nignite->github.com/containernetworking/\ncni - - + + github.com/containers/\nimage -github.com/containers/ -image +github.com/containers/ +image github.com/weaveworks/\nignite->github.com/containers/\nimage - - + + github.com/docker/\ndocker -github.com/docker/ -docker +github.com/docker/ +docker github.com/weaveworks/\nignite->github.com/docker/\ndocker - - + + github.com/docker/\ngo-connections -github.com/docker/ -go-connections +github.com/docker/ +go-connections github.com/weaveworks/\nignite->github.com/docker/\ngo-connections - - + + github.com/emicklei/\ngo-restful -github.com/emicklei/ -go-restful +github.com/emicklei/ +go-restful github.com/weaveworks/\nignite->github.com/emicklei/\ngo-restful - - + + github.com/freddierice/\ngo-losetup -github.com/freddierice/ -go-losetup +github.com/freddierice/ +go-losetup github.com/weaveworks/\nignite->github.com/freddierice/\ngo-losetup - - + + github.com/goombaio/\nnamegenerator -github.com/goombaio/ -namegenerator +github.com/goombaio/ +namegenerator github.com/weaveworks/\nignite->github.com/goombaio/\nnamegenerator - - + + github.com/krolaw/\ndhcp4 -github.com/krolaw/ -dhcp4 +github.com/krolaw/ +dhcp4 github.com/weaveworks/\nignite->github.com/krolaw/\ndhcp4 - - + + github.com/lithammer/\ndedent -github.com/lithammer/ -dedent +github.com/lithammer/ +dedent github.com/weaveworks/\nignite->github.com/lithammer/\ndedent - - + + github.com/Microsoft/\ngo-winio -github.com/Microsoft/ -go-winio +github.com/Microsoft/ +go-winio github.com/weaveworks/\nignite->github.com/Microsoft/\ngo-winio - - + + github.com/miekg/\ndns -github.com/miekg/ -dns +github.com/miekg/ +dns github.com/weaveworks/\nignite->github.com/miekg/\ndns - - + + github.com/morikuni/\naec -github.com/morikuni/ -aec +github.com/morikuni/ +aec github.com/weaveworks/\nignite->github.com/morikuni/\naec - - + + gotest.tools -gotest.tools +gotest.tools github.com/weaveworks/\nignite->gotest.tools - - + + cloud.google.com/go -cloud.google.com/go +cloud.google.com/go github.com/golang/\nmock -github.com/golang/ -mock +github.com/golang/ +mock cloud.google.com/go->github.com/golang/\nmock - - + + github.com/golang/\nprotobuf -github.com/golang/ -protobuf +github.com/golang/ +protobuf cloud.google.com/go->github.com/golang/\nprotobuf - - + + github.com/googleapis/\ngax-go/v2 -github.com/googleapis/ -gax-go/v2 +github.com/googleapis/ +gax-go/v2 cloud.google.com/go->github.com/googleapis/\ngax-go/v2 - - + + github.com/google/\nbtree -github.com/google/ -btree +github.com/google/ +btree cloud.google.com/go->github.com/google/\nbtree - - + + github.com/google/\ngo-cmp -github.com/google/ -go-cmp +github.com/google/ +go-cmp cloud.google.com/go->github.com/google/\ngo-cmp - - + + github.com/google/\nmartian -github.com/google/ -martian +github.com/google/ +martian cloud.google.com/go->github.com/google/\nmartian - - + + github.com/google/\npprof -github.com/google/ -pprof +github.com/google/ +pprof cloud.google.com/go->github.com/google/\npprof - - + + github.com/jstemmer/\ngo-junit-report -github.com/jstemmer/ -go-junit-report +github.com/jstemmer/ +go-junit-report cloud.google.com/go->github.com/jstemmer/\ngo-junit-report - - + + golang.org/x/exp -golang.org/x/exp +golang.org/x/exp cloud.google.com/go->golang.org/x/exp - - + + golang.org/x/lint -golang.org/x/lint +golang.org/x/lint cloud.google.com/go->golang.org/x/lint - - + + golang.org/x/oauth2 -golang.org/x/oauth2 +golang.org/x/oauth2 cloud.google.com/go->golang.org/x/oauth2 - - + + cloud.google.com/go->golang.org/x/sync - - + + golang.org/x/text -golang.org/x/text +golang.org/x/text cloud.google.com/go->golang.org/x/text - - + + golang.org/x/time -golang.org/x/time +golang.org/x/time cloud.google.com/go->golang.org/x/time - - + + golang.org/x/tools -golang.org/x/tools +golang.org/x/tools cloud.google.com/go->golang.org/x/tools - - + + google.golang.org/api -google.golang.org/api +google.golang.org/api cloud.google.com/go->google.golang.org/api - - + + google.golang.org/genproto -google.golang.org/genproto +google.golang.org/genproto cloud.google.com/go->google.golang.org/genproto - - + + cloud.google.com/go->google.golang.org/grpc - - + + go.opencensus.io -go.opencensus.io +go.opencensus.io cloud.google.com/go->go.opencensus.io - - + + honnef.co/go/tools -honnef.co/go/tools +honnef.co/go/tools cloud.google.com/go->honnef.co/go/tools - - + + github.com/googleapis/\ngax-go/v2->google.golang.org/grpc - - + + golang.org/x/exp->golang.org/x/tools - - + + golang.org/x/sys -golang.org/x/sys +golang.org/x/sys golang.org/x/exp->golang.org/x/sys - - + + github.com/BurntSushi/\nxgb -github.com/BurntSushi/ -xgb +github.com/BurntSushi/ +xgb golang.org/x/exp->github.com/BurntSushi/\nxgb - - + + golang.org/x/image -golang.org/x/image +golang.org/x/image golang.org/x/exp->golang.org/x/image - - + + golang.org/x/mobile -golang.org/x/mobile +golang.org/x/mobile golang.org/x/exp->golang.org/x/mobile - - + + golang.org/x/lint->golang.org/x/tools - - + + golang.org/x/oauth2->cloud.google.com/go - - + + golang.org/x/oauth2->golang.org/x/sync - - + + golang.org/x/net -golang.org/x/net +golang.org/x/net golang.org/x/oauth2->golang.org/x/net - - + + google.golang.org/appengine -google.golang.org/appengine +google.golang.org/appengine golang.org/x/oauth2->google.golang.org/appengine - - + + golang.org/x/text->golang.org/x/tools - - + + golang.org/x/tools->golang.org/x/sync - - + + golang.org/x/tools->golang.org/x/net - - + + golang.org/x/tools->google.golang.org/appengine - - + + google.golang.org/api->github.com/google/\ngo-cmp - - + + google.golang.org/api->golang.org/x/lint - - + + google.golang.org/api->golang.org/x/oauth2 - - + + google.golang.org/api->golang.org/x/sync - - + + google.golang.org/api->golang.org/x/tools - - + + google.golang.org/api->google.golang.org/genproto - - + + google.golang.org/api->google.golang.org/grpc - - + + google.golang.org/api->go.opencensus.io - - + + google.golang.org/api->honnef.co/go/tools - - + + google.golang.org/api->google.golang.org/appengine - - + + google.golang.org/genproto->github.com/golang/\nprotobuf - - + + google.golang.org/genproto->golang.org/x/exp - - + + google.golang.org/genproto->golang.org/x/lint - - + + google.golang.org/genproto->golang.org/x/sync - - + + google.golang.org/genproto->golang.org/x/tools - - + + google.golang.org/genproto->google.golang.org/grpc - - + + google.golang.org/genproto->honnef.co/go/tools - - + + google.golang.org/genproto->golang.org/x/net - - + + google.golang.org/grpc->cloud.google.com/go - - + + google.golang.org/grpc->github.com/golang/\nmock - - + + google.golang.org/grpc->github.com/golang/\nprotobuf - - + + google.golang.org/grpc->github.com/google/\ngo-cmp - - + + google.golang.org/grpc->golang.org/x/lint - - + + google.golang.org/grpc->golang.org/x/oauth2 - - + + google.golang.org/grpc->golang.org/x/sync - - + + google.golang.org/grpc->golang.org/x/text - - + + google.golang.org/grpc->golang.org/x/tools - - + + google.golang.org/grpc->google.golang.org/genproto - - + + google.golang.org/grpc->honnef.co/go/tools - - + + google.golang.org/grpc->golang.org/x/net - - + + github.com/gogo/\ngoogleapis -github.com/gogo/ -googleapis +github.com/gogo/ +googleapis google.golang.org/grpc->github.com/gogo/\ngoogleapis - - + + github.com/gogo/\nprotobuf -github.com/gogo/ -protobuf +github.com/gogo/ +protobuf google.golang.org/grpc->github.com/gogo/\nprotobuf - - + + google.golang.org/grpc->golang.org/x/sys - - + + github.com/golang/\nglog -github.com/golang/ -glog +github.com/golang/ +glog google.golang.org/grpc->github.com/golang/\nglog - - + + github.com/kisielk/\ngotool -github.com/kisielk/ -gotool +github.com/kisielk/ +gotool google.golang.org/grpc->github.com/kisielk/\ngotool - - + + github.com/BurntSushi/\ntoml -github.com/BurntSushi/ -toml +github.com/BurntSushi/ +toml google.golang.org/grpc->github.com/BurntSushi/\ntoml - - + + google.golang.org/grpc->google.golang.org/appengine - - + + github.com/client9/\nmisspell -github.com/client9/ -misspell +github.com/client9/ +misspell google.golang.org/grpc->github.com/client9/\nmisspell - - + + github.com/envoyproxy/\ngo-control-plane -github.com/envoyproxy/ -go-control-plane +github.com/envoyproxy/ +go-control-plane google.golang.org/grpc->github.com/envoyproxy/\ngo-control-plane - - + + github.com/lyft/\nprotoc-gen-validate -github.com/lyft/ -protoc-gen-validate +github.com/lyft/ +protoc-gen-validate google.golang.org/grpc->github.com/lyft/\nprotoc-gen-validate - - + + go.opencensus.io->github.com/golang/\nprotobuf - - + + go.opencensus.io->github.com/google/\ngo-cmp - - + + go.opencensus.io->google.golang.org/api - - + + go.opencensus.io->google.golang.org/grpc - - + + go.opencensus.io->golang.org/x/net - - + + github.com/openzipkin/\nzipkin-go -github.com/openzipkin/ -zipkin-go +github.com/openzipkin/ +zipkin-go go.opencensus.io->github.com/openzipkin/\nzipkin-go - - + + go.opencensus.io->github.com/prometheus/\nclient_golang - - + + github.com/hashicorp/\ngolang-lru -github.com/hashicorp/ -golang-lru +github.com/hashicorp/ +golang-lru go.opencensus.io->github.com/hashicorp/\ngolang-lru - - + + github.com/apache/\nthrift -github.com/apache/ -thrift +github.com/apache/ +thrift go.opencensus.io->github.com/apache/\nthrift - - + + contrib.go.opencensus.io/exporter/ocagent -contrib.go.opencensus.io/exporter/ocagent +contrib.go.opencensus.io/exporter/ocagent contrib.go.opencensus.io/exporter/ocagent->github.com/golang/\nprotobuf - - + + contrib.go.opencensus.io/exporter/ocagent->google.golang.org/api - - + + contrib.go.opencensus.io/exporter/ocagent->google.golang.org/grpc - - + + contrib.go.opencensus.io/exporter/ocagent->go.opencensus.io - - + + github.com/census-instrumentation/\nopencensus-proto -github.com/census-instrumentation/ -opencensus-proto +github.com/census-instrumentation/ +opencensus-proto contrib.go.opencensus.io/exporter/ocagent->github.com/census-instrumentation/\nopencensus-proto - - + + github.com/grpc-ecosystem/\ngrpc-gateway -github.com/grpc-ecosystem/ -grpc-gateway +github.com/grpc-ecosystem/ +grpc-gateway contrib.go.opencensus.io/exporter/ocagent->github.com/grpc-ecosystem/\ngrpc-gateway - - + + github.com/grpc-ecosystem/\ngrpc-gateway->github.com/golang/\nprotobuf - - + + github.com/grpc-ecosystem/\ngrpc-gateway->google.golang.org/genproto - - + + github.com/grpc-ecosystem/\ngrpc-gateway->google.golang.org/grpc - - + + github.com/grpc-ecosystem/\ngrpc-gateway->golang.org/x/net - - + + gopkg.in/yaml.v2 -gopkg.in/yaml.v2 +gopkg.in/yaml.v2 github.com/grpc-ecosystem/\ngrpc-gateway->gopkg.in/yaml.v2 - - + + github.com/grpc-ecosystem/\ngrpc-gateway->golang.org/x/sys - - + + github.com/ghodss/\nyaml -github.com/ghodss/ -yaml +github.com/ghodss/ +yaml github.com/grpc-ecosystem/\ngrpc-gateway->github.com/ghodss/\nyaml - - + + github.com/grpc-ecosystem/\ngrpc-gateway->github.com/golang/\nglog - - + + github.com/kr/\npretty -github.com/kr/ -pretty +github.com/kr/ +pretty github.com/grpc-ecosystem/\ngrpc-gateway->github.com/kr/\npretty - - + + github.com/rogpeppe/\nfastuuid -github.com/rogpeppe/ -fastuuid +github.com/rogpeppe/ +fastuuid github.com/grpc-ecosystem/\ngrpc-gateway->github.com/rogpeppe/\nfastuuid - - + + gopkg.in/check.v1 -gopkg.in/check.v1 +gopkg.in/check.v1 github.com/grpc-ecosystem/\ngrpc-gateway->gopkg.in/check.v1 - - + + gopkg.in/resty.v1 -gopkg.in/resty.v1 +gopkg.in/resty.v1 github.com/grpc-ecosystem/\ngrpc-gateway->gopkg.in/resty.v1 - - + + github.com/aws/\naws-sdk-go -github.com/aws/ -aws-sdk-go +github.com/aws/ +aws-sdk-go github.com/jmespath/\ngo-jmespath -github.com/jmespath/ -go-jmespath +github.com/jmespath/ +go-jmespath github.com/aws/\naws-sdk-go->github.com/jmespath/\ngo-jmespath - - + + github.com/cpuguy83/\ngo-md2man -github.com/cpuguy83/ -go-md2man +github.com/cpuguy83/ +go-md2man github.com/russross/\nblackfriday -github.com/russross/ -blackfriday +github.com/russross/ +blackfriday github.com/cpuguy83/\ngo-md2man->github.com/russross/\nblackfriday - - + + github.com/elazarl/\ngoproxy/ext -github.com/elazarl/ -goproxy/ext +github.com/elazarl/ +goproxy/ext github.com/rogpeppe/\ngo-charset -github.com/rogpeppe/ -go-charset +github.com/rogpeppe/ +go-charset github.com/elazarl/\ngoproxy/ext->github.com/rogpeppe/\ngo-charset - - + + github.com/go-openapi/\nerrors -github.com/go-openapi/ -errors +github.com/go-openapi/ +errors github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/go-openapi/\nerrors - - + + github.com/go-openapi/\nruntime -github.com/go-openapi/ -runtime +github.com/go-openapi/ +runtime github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/go-openapi/\nruntime - - + + github.com/go-openapi/\nstrfmt -github.com/go-openapi/ -strfmt +github.com/go-openapi/ +strfmt github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/go-openapi/\nstrfmt - - + + github.com/go-openapi/\nswag -github.com/go-openapi/ -swag +github.com/go-openapi/ +swag github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nvalidate -github.com/go-openapi/ -validate +github.com/go-openapi/ +validate github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/go-openapi/\nvalidate - - + + github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/sirupsen/\nlogrus - - + + github.com/stretchr/\ntestify -github.com/stretchr/ -testify +github.com/stretchr/ +testify github.com/firecracker-microvm/\nfirecracker-go-sdk->github.com/stretchr/\ntestify - - + + github.com/firecracker-microvm/\nfirecracker-go-sdk->golang.org/x/net - - + + github.com/go-openapi/\nerrors->github.com/stretchr/\ntestify - - + + github.com/davecgh/\ngo-spew -github.com/davecgh/ -go-spew +github.com/davecgh/ +go-spew github.com/go-openapi/\nerrors->github.com/davecgh/\ngo-spew - - + + github.com/pmezard/\ngo-difflib -github.com/pmezard/ -go-difflib +github.com/pmezard/ +go-difflib github.com/go-openapi/\nerrors->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\nruntime->github.com/go-openapi/\nerrors - - + + github.com/go-openapi/\nruntime->github.com/go-openapi/\nstrfmt - - + + github.com/go-openapi/\nruntime->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nruntime->github.com/go-openapi/\nvalidate - - + + github.com/go-openapi/\nruntime->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nanalysis -github.com/go-openapi/ -analysis +github.com/go-openapi/ +analysis github.com/go-openapi/\nruntime->github.com/go-openapi/\nanalysis - - + + github.com/go-openapi/\nloads -github.com/go-openapi/ -loads +github.com/go-openapi/ +loads github.com/go-openapi/\nruntime->github.com/go-openapi/\nloads - - + + github.com/go-openapi/\nruntime->github.com/go-openapi/\nspec - - + + github.com/go-openapi/\nruntime->gopkg.in/yaml.v2 - - + + github.com/docker/\ngo-units -github.com/docker/ -go-units +github.com/docker/ +go-units github.com/go-openapi/\nruntime->github.com/docker/\ngo-units - - + + github.com/go-openapi/\nstrfmt->github.com/go-openapi/\nerrors - - + + github.com/go-openapi/\nstrfmt->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nstrfmt->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\nstrfmt->github.com/pmezard/\ngo-difflib - - + + github.com/mailru/\neasyjson -github.com/mailru/ -easyjson +github.com/mailru/ +easyjson github.com/go-openapi/\nstrfmt->github.com/mailru/\neasyjson - - + + github.com/asaskevich/\ngovalidator -github.com/asaskevich/ -govalidator +github.com/asaskevich/ +govalidator github.com/go-openapi/\nstrfmt->github.com/asaskevich/\ngovalidator - - + + github.com/globalsign/\nmgo -github.com/globalsign/ -mgo +github.com/globalsign/ +mgo github.com/go-openapi/\nstrfmt->github.com/globalsign/\nmgo - - + + github.com/mitchellh/\nmapstructure -github.com/mitchellh/ -mapstructure +github.com/mitchellh/ +mapstructure github.com/go-openapi/\nstrfmt->github.com/mitchellh/\nmapstructure - - + + github.com/pborman/\nuuid -github.com/pborman/ -uuid +github.com/pborman/ +uuid github.com/go-openapi/\nstrfmt->github.com/pborman/\nuuid - - + + github.com/go-openapi/\nswag->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nswag->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\nswag->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\nswag->github.com/mailru/\neasyjson - - + + github.com/go-openapi/\nswag->gopkg.in/yaml.v2 - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nerrors - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nruntime - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nstrfmt - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nvalidate->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nanalysis - - + + github.com/go-openapi/\njsonpointer -github.com/go-openapi/ -jsonpointer +github.com/go-openapi/ +jsonpointer github.com/go-openapi/\nvalidate->github.com/go-openapi/\njsonpointer - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nloads - - + + github.com/go-openapi/\nvalidate->github.com/go-openapi/\nspec - - + + github.com/go-openapi/\nvalidate->gopkg.in/yaml.v2 - - + + github.com/sirupsen/\nlogrus->github.com/stretchr/\ntestify - - + + github.com/sirupsen/\nlogrus->github.com/davecgh/\ngo-spew - - + + github.com/sirupsen/\nlogrus->github.com/pmezard/\ngo-difflib - - + + golang.org/x/crypto -golang.org/x/crypto +golang.org/x/crypto github.com/sirupsen/\nlogrus->golang.org/x/crypto - - + + github.com/sirupsen/\nlogrus->golang.org/x/sys - - + + github.com/konsorten/\ngo-windows-terminal-sequences -github.com/konsorten/ -go-windows-terminal-sequences +github.com/konsorten/ +go-windows-terminal-sequences github.com/sirupsen/\nlogrus->github.com/konsorten/\ngo-windows-terminal-sequences - - + + github.com/stretchr/\nobjx -github.com/stretchr/ -objx +github.com/stretchr/ +objx github.com/sirupsen/\nlogrus->github.com/stretchr/\nobjx - - + + github.com/stretchr/\ntestify->github.com/davecgh/\ngo-spew - - + + github.com/stretchr/\ntestify->github.com/pmezard/\ngo-difflib - - + + github.com/stretchr/\ntestify->github.com/stretchr/\nobjx - - + + golang.org/x/net->golang.org/x/text - - + + golang.org/x/net->golang.org/x/crypto - - + + github.com/gogo/\ngoogleapis->github.com/gogo/\nprotobuf - - + + github.com/kisielk/\nerrcheck -github.com/kisielk/ -errcheck +github.com/kisielk/ +errcheck github.com/gogo/\nprotobuf->github.com/kisielk/\nerrcheck - - + + github.com/kisielk/\nerrcheck->golang.org/x/tools - - + + github.com/kisielk/\nerrcheck->github.com/kisielk/\ngotool - - + + github.com/gogo/\nstatus -github.com/gogo/ -status +github.com/gogo/ +status github.com/gogo/\nstatus->github.com/golang/\nprotobuf - - + + github.com/gogo/\nstatus->golang.org/x/sync - - + + github.com/gogo/\nstatus->google.golang.org/genproto - - + + github.com/gogo/\nstatus->google.golang.org/grpc - - + + github.com/gogo/\nstatus->github.com/gogo/\ngoogleapis - - + + github.com/gogo/\nstatus->github.com/gogo/\nprotobuf - - + + github.com/go-logfmt/\nlogfmt -github.com/go-logfmt/ -logfmt +github.com/go-logfmt/ +logfmt github.com/kr/\nlogfmt -github.com/kr/ -logfmt +github.com/kr/ +logfmt github.com/go-logfmt/\nlogfmt->github.com/kr/\nlogfmt - - + + github.com/go-openapi/\nanalysis->github.com/go-openapi/\nstrfmt - - + + github.com/go-openapi/\nanalysis->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nanalysis->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nanalysis->github.com/go-openapi/\njsonpointer - - + + github.com/go-openapi/\nanalysis->github.com/go-openapi/\nloads - - + + github.com/go-openapi/\nanalysis->github.com/go-openapi/\nspec - - + + github.com/go-openapi/\njsonpointer->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\njsonpointer->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\njsonpointer->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\njsonpointer->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\njsonpointer->github.com/mailru/\neasyjson - - + + github.com/go-openapi/\njsonpointer->gopkg.in/yaml.v2 - - + + github.com/go-openapi/\nloads->golang.org/x/text - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\nerrors - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\nstrfmt - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nloads->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nloads->golang.org/x/net - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\nanalysis - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\njsonpointer - - + + github.com/go-openapi/\nloads->github.com/go-openapi/\nspec - - + + github.com/go-openapi/\nloads->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\nloads->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\nloads->github.com/mailru/\neasyjson - - + + github.com/go-openapi/\nloads->gopkg.in/yaml.v2 - - + + github.com/go-openapi/\njsonreference -github.com/go-openapi/ -jsonreference +github.com/go-openapi/ +jsonreference github.com/go-openapi/\nloads->github.com/go-openapi/\njsonreference - - + + github.com/PuerkitoBio/\npurell -github.com/PuerkitoBio/ -purell +github.com/PuerkitoBio/ +purell github.com/go-openapi/\nloads->github.com/PuerkitoBio/\npurell - - + + github.com/PuerkitoBio/\nurlesc -github.com/PuerkitoBio/ -urlesc +github.com/PuerkitoBio/ +urlesc github.com/go-openapi/\nloads->github.com/PuerkitoBio/\nurlesc - - + + github.com/go-openapi/\nloads->github.com/asaskevich/\ngovalidator - - + + github.com/go-openapi/\nloads->github.com/globalsign/\nmgo - - + + github.com/go-openapi/\nloads->github.com/mitchellh/\nmapstructure - - + + github.com/go-openapi/\nspec->golang.org/x/text - - + + github.com/go-openapi/\nspec->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\nspec->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\nspec->golang.org/x/net - - + + github.com/go-openapi/\nspec->github.com/go-openapi/\njsonpointer - - + + github.com/go-openapi/\nspec->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\nspec->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\nspec->github.com/mailru/\neasyjson - - + + github.com/go-openapi/\nspec->gopkg.in/yaml.v2 - - + + github.com/go-openapi/\nspec->github.com/go-openapi/\njsonreference - - + + github.com/go-openapi/\nspec->github.com/PuerkitoBio/\npurell - - + + github.com/go-openapi/\nspec->github.com/PuerkitoBio/\nurlesc - - + + gopkg.in/yaml.v2->gopkg.in/check.v1 - - + + github.com/go-openapi/\njsonreference->golang.org/x/text - - + + github.com/go-openapi/\njsonreference->github.com/go-openapi/\nswag - - + + github.com/go-openapi/\njsonreference->github.com/stretchr/\ntestify - - + + github.com/go-openapi/\njsonreference->golang.org/x/net - - + + github.com/go-openapi/\njsonreference->github.com/go-openapi/\njsonpointer - - + + github.com/go-openapi/\njsonreference->github.com/davecgh/\ngo-spew - - + + github.com/go-openapi/\njsonreference->github.com/pmezard/\ngo-difflib - - + + github.com/go-openapi/\njsonreference->github.com/mailru/\neasyjson - - + + github.com/go-openapi/\njsonreference->gopkg.in/yaml.v2 - - + + github.com/go-openapi/\njsonreference->github.com/PuerkitoBio/\npurell - - + + github.com/go-openapi/\njsonreference->github.com/PuerkitoBio/\nurlesc - - + + github.com/google/\nuuid -github.com/google/ -uuid +github.com/google/ +uuid github.com/pborman/\nuuid->github.com/google/\nuuid - - + + github.com/gophercloud/\ngophercloud -github.com/gophercloud/ -gophercloud +github.com/gophercloud/ +gophercloud github.com/gophercloud/\ngophercloud->gopkg.in/yaml.v2 - - + + github.com/gophercloud/\ngophercloud->golang.org/x/crypto - - + + github.com/gophercloud/\ngophercloud->golang.org/x/sys - - + + golang.org/x/crypto->golang.org/x/sys - - + + github.com/kr/\ntext -github.com/kr/ -text +github.com/kr/ +text github.com/kr/\npretty->github.com/kr/\ntext - - + + gopkg.in/resty.v1->golang.org/x/net - - + + github.com/hashicorp/\nhcl -github.com/hashicorp/ -hcl +github.com/hashicorp/ +hcl github.com/hashicorp/\nhcl->github.com/davecgh/\ngo-spew - - + + github.com/justinbarrick/\ngo-k8s-portforward -github.com/justinbarrick/ -go-k8s-portforward +github.com/justinbarrick/ +go-k8s-portforward github.com/justinbarrick/\ngo-k8s-portforward->golang.org/x/time - - + + github.com/justinbarrick/\ngo-k8s-portforward->contrib.go.opencensus.io/exporter/ocagent - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/elazarl/\ngoproxy/ext - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/stretchr/\ntestify - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/gophercloud/\ngophercloud - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/justinbarrick/\ngo-k8s-portforward - - + + github.com/Azure/\ngo-autorest -github.com/Azure/ -go-autorest +github.com/Azure/ +go-autorest github.com/justinbarrick/\ngo-k8s-portforward->github.com/Azure/\ngo-autorest - - + + github.com/dgrijalva/\njwt-go -github.com/dgrijalva/ -jwt-go +github.com/dgrijalva/ +jwt-go github.com/justinbarrick/\ngo-k8s-portforward->github.com/dgrijalva/\njwt-go - - + + github.com/docker/\nspdystream -github.com/docker/ -spdystream +github.com/docker/ +spdystream github.com/justinbarrick/\ngo-k8s-portforward->github.com/docker/\nspdystream - - + + github.com/elazarl/\ngoproxy -github.com/elazarl/ -goproxy +github.com/elazarl/ +goproxy github.com/justinbarrick/\ngo-k8s-portforward->github.com/elazarl/\ngoproxy - - + + github.com/evanphx/\njson-patch -github.com/evanphx/ -json-patch +github.com/evanphx/ +json-patch github.com/justinbarrick/\ngo-k8s-portforward->github.com/evanphx/\njson-patch - - + + github.com/googleapis/\ngnostic -github.com/googleapis/ -gnostic +github.com/googleapis/ +gnostic github.com/justinbarrick/\ngo-k8s-portforward->github.com/googleapis/\ngnostic - - + + github.com/google/\ngofuzz -github.com/google/ -gofuzz +github.com/google/ +gofuzz github.com/justinbarrick/\ngo-k8s-portforward->github.com/google/\ngofuzz - - + + github.com/imdario/\nmergo -github.com/imdario/ -mergo +github.com/imdario/ +mergo github.com/justinbarrick/\ngo-k8s-portforward->github.com/imdario/\nmergo - - + + github.com/json-iterator/\ngo -github.com/json-iterator/ -go +github.com/json-iterator/ +go github.com/justinbarrick/\ngo-k8s-portforward->github.com/json-iterator/\ngo - - + + github.com/modern-go/\nconcurrent -github.com/modern-go/ -concurrent +github.com/modern-go/ +concurrent github.com/justinbarrick/\ngo-k8s-portforward->github.com/modern-go/\nconcurrent - - + + github.com/modern-go/\nreflect2 -github.com/modern-go/ -reflect2 +github.com/modern-go/ +reflect2 github.com/justinbarrick/\ngo-k8s-portforward->github.com/modern-go/\nreflect2 - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/pkg/\nerrors - - + + github.com/justinbarrick/\ngo-k8s-portforward->github.com/spf13/\npflag - - + + gopkg.in/inf.v0 -gopkg.in/inf.v0 +gopkg.in/inf.v0 github.com/justinbarrick/\ngo-k8s-portforward->gopkg.in/inf.v0 - - + + k8s.io/api -k8s.io/api +k8s.io/api github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/api - - + + github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/apimachinery - - + + k8s.io/client-go -k8s.io/client-go +k8s.io/client-go github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/client-go - - + + k8s.io/klog -k8s.io/klog +k8s.io/klog github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/klog - - + + github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/kube-openapi - - + + k8s.io/utils -k8s.io/utils +k8s.io/utils github.com/justinbarrick/\ngo-k8s-portforward->k8s.io/utils - - + + github.com/justinbarrick/\ngo-k8s-portforward->sigs.k8s.io/yaml - - + + k8s.io/apimachinery->github.com/golang/\nprotobuf - - + + k8s.io/apimachinery->github.com/google/\ngo-cmp - - + + k8s.io/apimachinery->golang.org/x/sync - - + + k8s.io/apimachinery->golang.org/x/text - - + + k8s.io/apimachinery->github.com/stretchr/\ntestify - - + + k8s.io/apimachinery->golang.org/x/net - - + + k8s.io/apimachinery->github.com/gogo/\nprotobuf - - + + k8s.io/apimachinery->github.com/davecgh/\ngo-spew - - + + k8s.io/apimachinery->github.com/pmezard/\ngo-difflib - - + + k8s.io/apimachinery->gopkg.in/yaml.v2 - - + + k8s.io/apimachinery->golang.org/x/sys - - + + k8s.io/apimachinery->github.com/docker/\nspdystream - - + + k8s.io/apimachinery->github.com/elazarl/\ngoproxy - - + + k8s.io/apimachinery->github.com/evanphx/\njson-patch - - + + k8s.io/apimachinery->github.com/googleapis/\ngnostic - - + + k8s.io/apimachinery->github.com/google/\ngofuzz - - + + k8s.io/apimachinery->github.com/json-iterator/\ngo - - + + k8s.io/apimachinery->github.com/modern-go/\nconcurrent - - + + k8s.io/apimachinery->github.com/modern-go/\nreflect2 - - + + k8s.io/apimachinery->github.com/spf13/\npflag - - + + k8s.io/apimachinery->gopkg.in/inf.v0 - - + + k8s.io/apimachinery->k8s.io/klog - - + + k8s.io/apimachinery->k8s.io/kube-openapi - - + + k8s.io/apimachinery->sigs.k8s.io/yaml - - + + github.com/onsi/\ngomega -github.com/onsi/ -gomega +github.com/onsi/ +gomega k8s.io/apimachinery->github.com/onsi/\ngomega - - + + k8s.io/apimachinery->github.com/google/\nuuid - - + + github.com/golang/\ngroupcache -github.com/golang/ -groupcache +github.com/golang/ +groupcache k8s.io/apimachinery->github.com/golang/\ngroupcache - - + + k8s.io/apimachinery->github.com/hashicorp/\ngolang-lru - - + + github.com/mxk/\ngo-flowrate -github.com/mxk/ -go-flowrate +github.com/mxk/ +go-flowrate k8s.io/apimachinery->github.com/mxk/\ngo-flowrate - - + + github.com/kr/\npty -github.com/kr/ -pty +github.com/kr/ +pty github.com/kr/\ntext->github.com/kr/\npty - - + + github.com/onsi/\ngomega->github.com/golang/\nprotobuf - - + + github.com/onsi/\ngomega->golang.org/x/sync - - + + github.com/onsi/\ngomega->golang.org/x/text - - + + github.com/onsi/\ngomega->golang.org/x/net - - + + github.com/onsi/\ngomega->gopkg.in/yaml.v2 - - + + github.com/onsi/\ngomega->golang.org/x/sys - - + + github.com/fsnotify/\nfsnotify -github.com/fsnotify/ -fsnotify +github.com/fsnotify/ +fsnotify github.com/onsi/\ngomega->github.com/fsnotify/\nfsnotify - - + + github.com/hpcloud/\ntail -github.com/hpcloud/ -tail +github.com/hpcloud/ +tail github.com/onsi/\ngomega->github.com/hpcloud/\ntail - - + + github.com/onsi/\nginkgo -github.com/onsi/ -ginkgo +github.com/onsi/ +ginkgo github.com/onsi/\ngomega->github.com/onsi/\nginkgo - - + + gopkg.in/fsnotify.v1 -gopkg.in/fsnotify.v1 +gopkg.in/fsnotify.v1 github.com/onsi/\ngomega->gopkg.in/fsnotify.v1 - - + + gopkg.in/tomb.v1 -gopkg.in/tomb.v1 +gopkg.in/tomb.v1 github.com/onsi/\ngomega->gopkg.in/tomb.v1 - - + + github.com/openzipkin/\nzipkin-go->github.com/golang/\nprotobuf - - + + github.com/openzipkin/\nzipkin-go->golang.org/x/sync - - + + github.com/openzipkin/\nzipkin-go->google.golang.org/grpc - - + + github.com/openzipkin/\nzipkin-go->golang.org/x/net - - + + github.com/openzipkin/\nzipkin-go->github.com/gogo/\nprotobuf - - + + github.com/openzipkin/\nzipkin-go->github.com/davecgh/\ngo-spew - - + + github.com/openzipkin/\nzipkin-go->golang.org/x/sys - - + + github.com/openzipkin/\nzipkin-go->github.com/onsi/\ngomega - - + + github.com/openzipkin/\nzipkin-go->github.com/onsi/\nginkgo - - + + github.com/eapache/\ngo-resiliency -github.com/eapache/ -go-resiliency +github.com/eapache/ +go-resiliency github.com/openzipkin/\nzipkin-go->github.com/eapache/\ngo-resiliency - - + + github.com/eapache/\ngo-xerial-snappy -github.com/eapache/ -go-xerial-snappy +github.com/eapache/ +go-xerial-snappy github.com/openzipkin/\nzipkin-go->github.com/eapache/\ngo-xerial-snappy - - + + github.com/eapache/\nqueue -github.com/eapache/ -queue +github.com/eapache/ +queue github.com/openzipkin/\nzipkin-go->github.com/eapache/\nqueue - - + + github.com/golang/\nsnappy -github.com/golang/ -snappy +github.com/golang/ +snappy github.com/openzipkin/\nzipkin-go->github.com/golang/\nsnappy - - + + github.com/gorilla/\ncontext -github.com/gorilla/ -context +github.com/gorilla/ +context github.com/openzipkin/\nzipkin-go->github.com/gorilla/\ncontext - - + + github.com/openzipkin/\nzipkin-go->github.com/gorilla/\nmux - - + + github.com/pierrec/\nlz4 -github.com/pierrec/ -lz4 +github.com/pierrec/ +lz4 github.com/openzipkin/\nzipkin-go->github.com/pierrec/\nlz4 - - + + github.com/rcrowley/\ngo-metrics -github.com/rcrowley/ -go-metrics +github.com/rcrowley/ +go-metrics github.com/openzipkin/\nzipkin-go->github.com/rcrowley/\ngo-metrics - - + + github.com/Shopify/\nsarama -github.com/Shopify/ -sarama +github.com/Shopify/ +sarama github.com/openzipkin/\nzipkin-go->github.com/Shopify/\nsarama - - + + github.com/Shopify/\ntoxiproxy -github.com/Shopify/ -toxiproxy +github.com/Shopify/ +toxiproxy github.com/openzipkin/\nzipkin-go->github.com/Shopify/\ntoxiproxy - - + + github.com/prometheus/\nclient_golang->github.com/golang/\nprotobuf - - + + github.com/prometheus/\nclient_golang->golang.org/x/sync - - + + github.com/prometheus/\nclient_golang->github.com/stretchr/\ntestify - - + + github.com/prometheus/\nclient_golang->golang.org/x/net - - + + github.com/prometheus/\nclient_golang->golang.org/x/sys - - + + github.com/prometheus/\nclient_golang->github.com/json-iterator/\ngo - - + + github.com/prometheus/\nclient_golang->github.com/modern-go/\nconcurrent - - + + github.com/prometheus/\nclient_golang->github.com/modern-go/\nreflect2 - - + + github.com/beorn7/\nperks -github.com/beorn7/ -perks +github.com/beorn7/ +perks github.com/prometheus/\nclient_golang->github.com/beorn7/\nperks - - + + github.com/prometheus/\nclient_model -github.com/prometheus/ -client_model +github.com/prometheus/ +client_model github.com/prometheus/\nclient_golang->github.com/prometheus/\nclient_model - - + + github.com/prometheus/\ncommon -github.com/prometheus/ -common +github.com/prometheus/ +common github.com/prometheus/\nclient_golang->github.com/prometheus/\ncommon - - + + github.com/prometheus/\nprocfs -github.com/prometheus/ -procfs +github.com/prometheus/ +procfs github.com/prometheus/\nclient_golang->github.com/prometheus/\nprocfs - - + + github.com/prometheus/\nclient_model->github.com/golang/\nprotobuf - - + + github.com/prometheus/\nclient_model->golang.org/x/sync - - + + github.com/prometheus/\ncommon->github.com/golang/\nprotobuf - - + + github.com/prometheus/\ncommon->golang.org/x/sync - - + + github.com/prometheus/\ncommon->github.com/sirupsen/\nlogrus - - + + github.com/prometheus/\ncommon->golang.org/x/net - - + + github.com/prometheus/\ncommon->github.com/gogo/\nprotobuf - - + + github.com/prometheus/\ncommon->github.com/go-logfmt/\nlogfmt - - + + github.com/prometheus/\ncommon->github.com/kr/\nlogfmt - - + + github.com/prometheus/\ncommon->gopkg.in/yaml.v2 - - + + github.com/prometheus/\ncommon->golang.org/x/sys - - + + github.com/prometheus/\ncommon->github.com/pkg/\nerrors - - + + github.com/prometheus/\ncommon->github.com/prometheus/\nclient_golang - - + + github.com/prometheus/\ncommon->github.com/beorn7/\nperks - - + + github.com/prometheus/\ncommon->github.com/prometheus/\nclient_model - - + + github.com/prometheus/\ncommon->github.com/prometheus/\nprocfs - - + + github.com/alecthomas/\ntemplate -github.com/alecthomas/ -template +github.com/alecthomas/ +template github.com/prometheus/\ncommon->github.com/alecthomas/\ntemplate - - + + github.com/alecthomas/\nunits -github.com/alecthomas/ -units +github.com/alecthomas/ +units github.com/prometheus/\ncommon->github.com/alecthomas/\nunits - - + + github.com/go-kit/\nkit -github.com/go-kit/ -kit +github.com/go-kit/ +kit github.com/prometheus/\ncommon->github.com/go-kit/\nkit - - + + github.com/go-stack/\nstack -github.com/go-stack/ -stack +github.com/go-stack/ +stack github.com/prometheus/\ncommon->github.com/go-stack/\nstack - - + + github.com/julienschmidt/\nhttprouter -github.com/julienschmidt/ -httprouter +github.com/julienschmidt/ +httprouter github.com/prometheus/\ncommon->github.com/julienschmidt/\nhttprouter - - + + github.com/matttproud/\ngolang_protobuf_extensions -github.com/matttproud/ -golang_protobuf_extensions +github.com/matttproud/ +golang_protobuf_extensions github.com/prometheus/\ncommon->github.com/matttproud/\ngolang_protobuf_extensions - - + + github.com/mwitkow/\ngo-conntrack -github.com/mwitkow/ -go-conntrack +github.com/mwitkow/ +go-conntrack github.com/prometheus/\ncommon->github.com/mwitkow/\ngo-conntrack - - + + gopkg.in/alecthomas/kingpin.v2 -gopkg.in/alecthomas/kingpin.v2 +gopkg.in/alecthomas/kingpin.v2 github.com/prometheus/\ncommon->gopkg.in/alecthomas/kingpin.v2 - - + + github.com/prometheus/\nprocfs->golang.org/x/sync - - + + github.com/spf13/\ncast -github.com/spf13/ -cast +github.com/spf13/ +cast github.com/spf13/\ncast->github.com/stretchr/\ntestify - - + + github.com/spf13/\ncast->github.com/davecgh/\ngo-spew - - + + github.com/spf13/\ncast->github.com/pmezard/\ngo-difflib - - + + github.com/spf13/\ncobra->github.com/cpuguy83/\ngo-md2man - - + + github.com/spf13/\ncobra->gopkg.in/yaml.v2 - - + + github.com/spf13/\ncobra->github.com/spf13/\npflag - - + + github.com/spf13/\ncobra->github.com/BurntSushi/\ntoml - - + + github.com/inconshreveable/\nmousetrap -github.com/inconshreveable/ -mousetrap +github.com/inconshreveable/ +mousetrap github.com/spf13/\ncobra->github.com/inconshreveable/\nmousetrap - - + + github.com/mitchellh/\ngo-homedir -github.com/mitchellh/ -go-homedir +github.com/mitchellh/ +go-homedir github.com/spf13/\ncobra->github.com/mitchellh/\ngo-homedir - - + + github.com/spf13/\nviper -github.com/spf13/ -viper +github.com/spf13/ +viper github.com/spf13/\ncobra->github.com/spf13/\nviper - - + + github.com/spf13/\nviper->golang.org/x/text - - + + github.com/spf13/\nviper->github.com/stretchr/\ntestify - - + + github.com/spf13/\nviper->gopkg.in/yaml.v2 - - + + github.com/spf13/\nviper->github.com/mitchellh/\nmapstructure - - + + github.com/spf13/\nviper->golang.org/x/crypto - - + + github.com/spf13/\nviper->golang.org/x/sys - - + + github.com/spf13/\nviper->github.com/hashicorp/\nhcl - - + + github.com/spf13/\nviper->github.com/spf13/\npflag - - + + github.com/spf13/\nviper->github.com/fsnotify/\nfsnotify - - + + github.com/spf13/\nviper->github.com/spf13/\ncast - - + + github.com/armon/\nconsul-api -github.com/armon/ -consul-api +github.com/armon/ +consul-api github.com/spf13/\nviper->github.com/armon/\nconsul-api - - + + github.com/coreos/\netcd -github.com/coreos/ -etcd +github.com/coreos/ +etcd github.com/spf13/\nviper->github.com/coreos/\netcd - - + + github.com/coreos/\ngo-etcd -github.com/coreos/ -go-etcd +github.com/coreos/ +go-etcd github.com/spf13/\nviper->github.com/coreos/\ngo-etcd - - + + github.com/coreos/\ngo-semver -github.com/coreos/ -go-semver +github.com/coreos/ +go-semver github.com/spf13/\nviper->github.com/coreos/\ngo-semver - - + + github.com/magiconair/\nproperties -github.com/magiconair/ -properties +github.com/magiconair/ +properties github.com/spf13/\nviper->github.com/magiconair/\nproperties - - + + github.com/pelletier/\ngo-toml -github.com/pelletier/ -go-toml +github.com/pelletier/ +go-toml github.com/spf13/\nviper->github.com/pelletier/\ngo-toml - - + + github.com/spf13/\nafero -github.com/spf13/ -afero +github.com/spf13/ +afero github.com/spf13/\nviper->github.com/spf13/\nafero - - + + github.com/spf13/\njwalterweatherman -github.com/spf13/ -jwalterweatherman +github.com/spf13/ +jwalterweatherman github.com/spf13/\nviper->github.com/spf13/\njwalterweatherman - - + + github.com/ugorji/\ngo/codec -github.com/ugorji/ -go/codec +github.com/ugorji/ +go/codec github.com/spf13/\nviper->github.com/ugorji/\ngo/codec - - + + github.com/xordataexchange/\ncrypt -github.com/xordataexchange/ -crypt +github.com/xordataexchange/ +crypt github.com/spf13/\nviper->github.com/xordataexchange/\ncrypt - - + + github.com/weaveworks/\nflux->cloud.google.com/go - - + + github.com/weaveworks/\nflux->github.com/golang/\nprotobuf - - + + github.com/weaveworks/\nflux->github.com/google/\ngo-cmp - - + + github.com/weaveworks/\nflux->golang.org/x/oauth2 - - + + github.com/weaveworks/\nflux->golang.org/x/time - - + + github.com/weaveworks/\nflux->google.golang.org/api - - + + github.com/weaveworks/\nflux->google.golang.org/grpc - - + + github.com/weaveworks/\nflux->github.com/aws/\naws-sdk-go - - + + github.com/weaveworks/\nflux->github.com/sirupsen/\nlogrus - - + + github.com/weaveworks/\nflux->github.com/stretchr/\ntestify - - + + github.com/weaveworks/\nflux->golang.org/x/net - - + + github.com/weaveworks/\nflux->github.com/gogo/\ngoogleapis - - + + github.com/weaveworks/\nflux->github.com/gogo/\nstatus - - + + github.com/weaveworks/\nflux->github.com/go-logfmt/\nlogfmt - - + + github.com/weaveworks/\nflux->gopkg.in/yaml.v2 - - + + github.com/weaveworks/\nflux->github.com/gophercloud/\ngophercloud - - + + github.com/weaveworks/\nflux->golang.org/x/crypto - - + + github.com/weaveworks/\nflux->golang.org/x/sys - - + + github.com/weaveworks/\nflux->github.com/ghodss/\nyaml - - + + github.com/weaveworks/\nflux->github.com/justinbarrick/\ngo-k8s-portforward - - + + github.com/weaveworks/\nflux->github.com/docker/\nspdystream - - + + github.com/weaveworks/\nflux->github.com/evanphx/\njson-patch - - + + github.com/weaveworks/\nflux->github.com/google/\ngofuzz - - + + github.com/weaveworks/\nflux->github.com/imdario/\nmergo - - + + github.com/weaveworks/\nflux->github.com/pkg/\nerrors - - + + github.com/weaveworks/\nflux->github.com/spf13/\npflag - - + + github.com/weaveworks/\nflux->k8s.io/api - - + + github.com/weaveworks/\nflux->k8s.io/apimachinery - - + + github.com/weaveworks/\nflux->k8s.io/client-go - - + + github.com/weaveworks/\nflux->k8s.io/klog - - + + github.com/weaveworks/\nflux->k8s.io/kube-openapi - - + + github.com/weaveworks/\nflux->github.com/gorilla/\nmux - - + + github.com/weaveworks/\nflux->github.com/google/\nuuid - - + + github.com/weaveworks/\nflux->github.com/prometheus/\nclient_golang - - + + github.com/weaveworks/\nflux->github.com/prometheus/\nclient_model - - + + github.com/weaveworks/\nflux->github.com/prometheus/\ncommon - - + + github.com/weaveworks/\nflux->github.com/prometheus/\nprocfs - - + + github.com/weaveworks/\nflux->github.com/go-kit/\nkit - - + + github.com/weaveworks/\nflux->github.com/konsorten/\ngo-windows-terminal-sequences - - + + github.com/weaveworks/\nflux->github.com/spf13/\ncobra - - + + github.com/weaveworks/\nflux->github.com/inconshreveable/\nmousetrap - - + + github.com/bradfitz/\ngomemcache -github.com/bradfitz/ -gomemcache +github.com/bradfitz/ +gomemcache github.com/weaveworks/\nflux->github.com/bradfitz/\ngomemcache - - + + github.com/codahale/\nhdrhistogram -github.com/codahale/ -hdrhistogram +github.com/codahale/ +hdrhistogram github.com/weaveworks/\nflux->github.com/codahale/\nhdrhistogram - - + + github.com/cyphar/\nfilepath-securejoin -github.com/cyphar/ -filepath-securejoin +github.com/cyphar/ +filepath-securejoin github.com/weaveworks/\nflux->github.com/cyphar/\nfilepath-securejoin - - + + github.com/weaveworks/\nflux->github.com/docker/\ndistribution - - + + github.com/docker/\ngo-metrics -github.com/docker/ -go-metrics +github.com/docker/ +go-metrics github.com/weaveworks/\nflux->github.com/docker/\ngo-metrics - - + + github.com/docker/\nlibtrust -github.com/docker/ -libtrust +github.com/docker/ +libtrust github.com/weaveworks/\nflux->github.com/docker/\nlibtrust - - + + github.com/gobwas/\nglob -github.com/gobwas/ -glob +github.com/gobwas/ +glob github.com/weaveworks/\nflux->github.com/gobwas/\nglob - - + + github.com/golang/\ngddo -github.com/golang/ -gddo +github.com/golang/ +gddo github.com/weaveworks/\nflux->github.com/golang/\ngddo - - + + github.com/weaveworks/\nflux->github.com/golang/\ngroupcache - - + + github.com/gorilla/\nwebsocket -github.com/gorilla/ -websocket +github.com/gorilla/ +websocket github.com/weaveworks/\nflux->github.com/gorilla/\nwebsocket - - + + github.com/hashicorp/\ngo-cleanhttp -github.com/hashicorp/ -go-cleanhttp +github.com/hashicorp/ +go-cleanhttp github.com/weaveworks/\nflux->github.com/hashicorp/\ngo-cleanhttp - - + + github.com/weaveworks/\nflux->github.com/hashicorp/\ngolang-lru - - + + github.com/huandu/\nxstrings -github.com/huandu/ -xstrings +github.com/huandu/ +xstrings github.com/weaveworks/\nflux->github.com/huandu/\nxstrings - - + + github.com/Masterminds/\ngoutils -github.com/Masterminds/ -goutils +github.com/Masterminds/ +goutils github.com/weaveworks/\nflux->github.com/Masterminds/\ngoutils - - + + github.com/Masterminds/\nsemver -github.com/Masterminds/ -semver +github.com/Masterminds/ +semver github.com/weaveworks/\nflux->github.com/Masterminds/\nsemver - - + + github.com/Masterminds/\nsprig -github.com/Masterminds/ -sprig +github.com/Masterminds/ +sprig github.com/weaveworks/\nflux->github.com/Masterminds/\nsprig - - + + github.com/ncabatoff/\ngo-seq -github.com/ncabatoff/ -go-seq +github.com/ncabatoff/ +go-seq github.com/weaveworks/\nflux->github.com/ncabatoff/\ngo-seq - - + + github.com/opencontainers/\ngo-digest -github.com/opencontainers/ -go-digest +github.com/opencontainers/ +go-digest github.com/weaveworks/\nflux->github.com/opencontainers/\ngo-digest - - + + github.com/opencontainers/\nimage-spec -github.com/opencontainers/ -image-spec +github.com/opencontainers/ +image-spec github.com/weaveworks/\nflux->github.com/opencontainers/\nimage-spec - - + + github.com/opentracing-contrib/\ngo-stdlib -github.com/opentracing-contrib/ -go-stdlib +github.com/opentracing-contrib/ +go-stdlib github.com/weaveworks/\nflux->github.com/opentracing-contrib/\ngo-stdlib - - + + github.com/opentracing/\nopentracing-go -github.com/opentracing/ -opentracing-go +github.com/opentracing/ +opentracing-go github.com/weaveworks/\nflux->github.com/opentracing/\nopentracing-go - - + + github.com/pkg/\nterm -github.com/pkg/ -term +github.com/pkg/ +term github.com/weaveworks/\nflux->github.com/pkg/\nterm - - + + github.com/ryanuber/\ngo-glob -github.com/ryanuber/ -go-glob +github.com/ryanuber/ +go-glob github.com/weaveworks/\nflux->github.com/ryanuber/\ngo-glob - - + + github.com/uber/\njaeger-client-go -github.com/uber/ -jaeger-client-go +github.com/uber/ +jaeger-client-go github.com/weaveworks/\nflux->github.com/uber/\njaeger-client-go - - + + github.com/uber/\njaeger-lib -github.com/uber/ -jaeger-lib +github.com/uber/ +jaeger-lib github.com/weaveworks/\nflux->github.com/uber/\njaeger-lib - - + + github.com/VividCortex/\ngohistogram -github.com/VividCortex/ -gohistogram +github.com/VividCortex/ +gohistogram github.com/weaveworks/\nflux->github.com/VividCortex/\ngohistogram - - + + github.com/weaveworks/\ncommon -github.com/weaveworks/ -common +github.com/weaveworks/ +common github.com/weaveworks/\nflux->github.com/weaveworks/\ncommon - - + + github.com/weaveworks/\ngo-checkpoint -github.com/weaveworks/ -go-checkpoint +github.com/weaveworks/ +go-checkpoint github.com/weaveworks/\nflux->github.com/weaveworks/\ngo-checkpoint - - + + github.com/weaveworks/\npromrus -github.com/weaveworks/ -promrus +github.com/weaveworks/ +promrus github.com/weaveworks/\nflux->github.com/weaveworks/\npromrus - - + + github.com/whilp/\ngit-urls -github.com/whilp/ -git-urls +github.com/whilp/ +git-urls github.com/weaveworks/\nflux->github.com/whilp/\ngit-urls - - + + github.com/weaveworks/\nflux->google.golang.org/appengine - - + + k8s.io/apiextensions-apiserver -k8s.io/apiextensions-apiserver +k8s.io/apiextensions-apiserver github.com/weaveworks/\nflux->k8s.io/apiextensions-apiserver - - + + k8s.io/code-generator -k8s.io/code-generator +k8s.io/code-generator github.com/weaveworks/\nflux->k8s.io/code-generator - - + + k8s.io/helm -k8s.io/helm +k8s.io/helm github.com/weaveworks/\nflux->k8s.io/helm - - + + google.golang.org/appengine->github.com/golang/\nprotobuf - - + + google.golang.org/appengine->golang.org/x/text - - + + google.golang.org/appengine->golang.org/x/net - - + + k8s.io/code-generator->golang.org/x/tools - - + + k8s.io/code-generator->github.com/gogo/\nprotobuf - - + + k8s.io/code-generator->github.com/spf13/\npflag - - + + k8s.io/code-generator->k8s.io/klog - - + + gonum.org/v1/gonum -gonum.org/v1/gonum +gonum.org/v1/gonum k8s.io/code-generator->gonum.org/v1/gonum - - + + gonum.org/v1/netlib -gonum.org/v1/netlib +gonum.org/v1/netlib k8s.io/code-generator->gonum.org/v1/netlib - - + + k8s.io/gengo -k8s.io/gengo +k8s.io/gengo k8s.io/code-generator->k8s.io/gengo - - + + golang.org/x/image->golang.org/x/text - - + + gonum.org/v1/gonum->golang.org/x/exp - - + + gonum.org/v1/gonum->golang.org/x/tools - - + + gonum.org/v1/gonum->gonum.org/v1/netlib - - + + gonum.org/v1/netlib->golang.org/x/exp - - + + gonum.org/v1/netlib->gonum.org/v1/gonum - - + + github.com/remyoudompheng/\nbigfft -github.com/remyoudompheng/ -bigfft +github.com/remyoudompheng/ +bigfft gonum.org/v1/netlib->github.com/remyoudompheng/\nbigfft - - + + modernc.org/cc -modernc.org/cc +modernc.org/cc gonum.org/v1/netlib->modernc.org/cc - - + + modernc.org/golex -modernc.org/golex +modernc.org/golex gonum.org/v1/netlib->modernc.org/golex - - + + modernc.org/mathutil -modernc.org/mathutil +modernc.org/mathutil gonum.org/v1/netlib->modernc.org/mathutil - - + + modernc.org/strutil -modernc.org/strutil +modernc.org/strutil gonum.org/v1/netlib->modernc.org/strutil - - + + modernc.org/xc -modernc.org/xc +modernc.org/xc gonum.org/v1/netlib->modernc.org/xc - - + + diff --git a/pkg/apis/ignite/validation/validation.go b/pkg/apis/ignite/validation/validation.go index 1061066b8..c0fa08218 100644 --- a/pkg/apis/ignite/validation/validation.go +++ b/pkg/apis/ignite/validation/validation.go @@ -6,7 +6,6 @@ import ( api "github.com/weaveworks/ignite/pkg/apis/ignite" meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" - "k8s.io/apimachinery/pkg/util/validation/field" ) diff --git a/pkg/client/client_dynamic.go b/pkg/client/client_dynamic.go index 6ce9543ab..8031710ba 100644 --- a/pkg/client/client_dynamic.go +++ b/pkg/client/client_dynamic.go @@ -6,7 +6,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" "github.com/weaveworks/ignite/pkg/storage/filterer" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/client/client_resource_template.go b/pkg/client/client_resource_template.go index 0a6fa7f91..83b8ab685 100644 --- a/pkg/client/client_resource_template.go +++ b/pkg/client/client_resource_template.go @@ -16,7 +16,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" "github.com/weaveworks/ignite/pkg/storage/filterer" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/client/zz_generated.client_image.go b/pkg/client/zz_generated.client_image.go index 346f2aa23..99f88060f 100644 --- a/pkg/client/zz_generated.client_image.go +++ b/pkg/client/zz_generated.client_image.go @@ -1,4 +1,3 @@ - /* Note: This file is autogenerated! Do not edit it manually! Edit client_image_template.go instead, and run @@ -15,7 +14,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" "github.com/weaveworks/ignite/pkg/storage/filterer" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/client/zz_generated.client_kernel.go b/pkg/client/zz_generated.client_kernel.go index 698d1dbcf..f1919cd07 100644 --- a/pkg/client/zz_generated.client_kernel.go +++ b/pkg/client/zz_generated.client_kernel.go @@ -1,4 +1,3 @@ - /* Note: This file is autogenerated! Do not edit it manually! Edit client_kernel_template.go instead, and run @@ -15,7 +14,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" "github.com/weaveworks/ignite/pkg/storage/filterer" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/client/zz_generated.client_vm.go b/pkg/client/zz_generated.client_vm.go index da29eb385..a6572201f 100644 --- a/pkg/client/zz_generated.client_vm.go +++ b/pkg/client/zz_generated.client_vm.go @@ -1,4 +1,3 @@ - /* Note: This file is autogenerated! Do not edit it manually! Edit client_vm_template.go instead, and run @@ -15,7 +14,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" "github.com/weaveworks/ignite/pkg/storage/filterer" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/gitops/gitops.go b/pkg/gitops/gitops.go index e0cb0b1d1..cf6e114f5 100644 --- a/pkg/gitops/gitops.go +++ b/pkg/gitops/gitops.go @@ -13,7 +13,7 @@ import ( "github.com/weaveworks/ignite/pkg/dmlegacy" "github.com/weaveworks/ignite/pkg/gitops/gitdir" "github.com/weaveworks/ignite/pkg/operations" - "github.com/weaveworks/ignite/pkg/storage" + "github.com/weaveworks/ignite/pkg/storage/cache" "github.com/weaveworks/ignite/pkg/storage/manifest" "github.com/weaveworks/ignite/pkg/util" ) @@ -35,7 +35,7 @@ func RunLoop(url, branch string) error { // Construct a manifest storage for the path backed by git s := manifest.NewManifestStorage(dataDir) // Wrap the Manifest Storage with a cache for better performance, and create a client - c = client.NewClient(storage.NewCache(s)) + c = client.NewClient(cache.NewCache(s)) // Construct the GitDirectory implementation which backs the storage gitDir = gitdir.NewGitDirectory(url, dataDir, branch, syncInterval) // Start the GitDirectory sync loop diff --git a/pkg/providers/storage.go b/pkg/providers/storage.go index bf8d3db3c..0a58ce7c2 100644 --- a/pkg/providers/storage.go +++ b/pkg/providers/storage.go @@ -4,13 +4,14 @@ import ( "github.com/weaveworks/ignite/pkg/apis/ignite/scheme" "github.com/weaveworks/ignite/pkg/constants" "github.com/weaveworks/ignite/pkg/storage" + "github.com/weaveworks/ignite/pkg/storage/cache" ) // Storage is the default storage implementation var Storage storage.Storage func SetCachedStorage() error { - Storage = storage.NewCache( + Storage = cache.NewCache( storage.NewGenericStorage( storage.NewDefaultRawStorage(constants.DATA_DIR), scheme.Serializer)) return nil diff --git a/pkg/storage/cache.go b/pkg/storage/cache.go deleted file mode 100644 index 0517d7a2b..000000000 --- a/pkg/storage/cache.go +++ /dev/null @@ -1,292 +0,0 @@ -package storage - -import ( - log "github.com/sirupsen/logrus" - meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// Cache is an intermediate caching layer, which conforms to Storage -// Typically you back the cache with an actual storage -type Cache interface { - Storage - // Flush is used to write the state of the entire cache to storage - // Warning: this is a very expensive operation - Flush() error -} - -func NewCache(backingStorage Storage) Cache { - c := &cache{ - storage: backingStorage, - objectCache: newObjectCache(backingStorage.Get), - } - - return c -} - -type cache struct { - // storage is the backing storage for the cache - // used to look up non-cached Objects - storage Storage - - // cache caches the Objects by Kind and UID - // This guarantees uniqueness when looking up a specific Object - objectCache *objectCache -} - -var _ Cache = &cache{} - -type cacheObject struct { - object meta.Object - apiType bool -} - -type loadFunc func(schema.GroupVersionKind, meta.UID) (meta.Object, error) - -type objectCache struct { - objects map[schema.GroupVersionKind]map[meta.UID]cacheObject - loadFunc loadFunc -} - -func newObjectCache(l loadFunc) *objectCache { - return &objectCache{ - objects: make(map[schema.GroupVersionKind]map[meta.UID]cacheObject), - loadFunc: l, - } -} - -func (c *cache) New(gvk schema.GroupVersionKind) (meta.Object, error) { - // passthrough to storage - return c.storage.New(gvk) -} - -func (c *cache) Get(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) { - // If the requested Object resides in the cache, return it - if obj, err := c.objectCache.loadByID(gvk, uid); err != nil { - return nil, err - } else if obj != nil { - return obj, nil - } - - obj, err := c.storage.Get(gvk, uid) - - // If no errors occurred while loading, store the Object in the cache - if err != nil { - c.objectCache.store(obj) - } - - return obj, err -} - -func (c *cache) Set(gvk schema.GroupVersionKind, obj meta.Object) error { - // Store the changed Object in the cache - c.objectCache.store(obj) - - // TODO: For now the cache always flushes, we might add a Cache.Flush() later - return c.storage.Set(gvk, obj) -} - -// Patch performs a strategic merge patch on the object with the given UID, using the byte-encoded patch given -func (s *cache) Patch(gvk schema.GroupVersionKind, uid meta.UID, patch []byte) error { - // TODO: Should we do something here to cache the change? I don't think so, but... - // Just passthrough to the storage here - return s.storage.Patch(gvk, uid, patch) -} - -func (c *cache) Delete(gvk schema.GroupVersionKind, uid meta.UID) error { - // Delete the given Object from the cache and storage - c.objectCache.delete(gvk, uid) - return c.storage.Delete(gvk, uid) -} - -type listFunc func(gvk schema.GroupVersionKind) ([]meta.Object, error) -type cacheStoreFunc func([]meta.Object) - -// list is a common handler for List and ListMeta -func (c *cache) list(gvk schema.GroupVersionKind, slf, clf listFunc, csf cacheStoreFunc) ([]meta.Object, error) { - var objs []meta.Object - var storageCount uint64 - var err error - - if storageCount, err = c.storage.Count(gvk); err != nil { - return nil, err - } - - if c.objectCache.count(gvk) != storageCount { - // If the cache doesn't track all of the Objects, request them from the storage - if objs, err = slf(gvk); err != nil { - // If no errors occurred, store the Objects in the cache - csf(objs) - } - } else { - // If the cache tracks everything, return the cache's contents - objs, err = clf(gvk) - } - - return objs, err -} - -func (c *cache) List(gvk schema.GroupVersionKind) ([]meta.Object, error) { - return c.list(gvk, c.storage.List, c.objectCache.list, c.objectCache.storeAll) -} - -func (c *cache) ListMeta(gvk schema.GroupVersionKind) ([]meta.Object, error) { - return c.list(gvk, c.storage.ListMeta, c.objectCache.listMeta, c.objectCache.storeAllMeta) -} - -func (c *cache) Count(gvk schema.GroupVersionKind) (uint64, error) { - // The cache is transparent about how many items it has cached - return c.storage.Count(gvk) -} - -func (c *cache) Flush() error { - // Load the entire cache - allObjects, err := c.objectCache.loadAll() - if err != nil { - return err - } - - for _, obj := range allObjects { - // Request the storage to save each Object - gvk := obj.GroupVersionKind() - if err := c.storage.Set(gvk, obj); err != nil { - return err - } - } - - return nil -} - -// loadFull checks if the Object is an APIType, and loads the full Object in that case -func (c *objectCache) loadFull(obj cacheObject) (meta.Object, error) { - if !obj.apiType { - log.Debugf("cache: full %s object cached\n", obj.object.GetKind()) - return obj.object, nil - } - - log.Debugf("cache: loading full %s object\n", obj.object.GetKind()) - result, err := c.loadFunc(obj.object.GroupVersionKind(), obj.object.GetUID()) - if err != nil { - return nil, err - } - - c.store(result) - return result, nil -} - -func (c *objectCache) load(obj meta.Object) (meta.Object, error) { - return c.loadByID(obj.GroupVersionKind(), obj.GetUID()) -} - -func (c *objectCache) loadByID(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) { - if uids, ok := c.objects[gvk]; ok { - if obj, ok := uids[uid]; ok { - return c.loadFull(obj) - } - } - - return nil, nil -} - -func (c *objectCache) loadAll() ([]meta.Object, error) { - var size uint64 - - for gvk := range c.objects { - size += c.count(gvk) - } - - all := make([]meta.Object, 0, size) - - for gvk := range c.objects { - if objects, err := c.list(gvk); err == nil { - all = append(all, objects...) - } else { - return nil, err - } - } - - return all, nil -} - -func (c *objectCache) storeCO(obj cacheObject) { - gvk := obj.object.GroupVersionKind() - - if _, ok := c.objects[gvk]; !ok { - c.objects[gvk] = make(map[meta.UID]cacheObject) - } - - c.objects[gvk][obj.object.GetUID()] = obj -} - -func (c *objectCache) store(obj meta.Object) { - log.Debugf("cache: storing %s object\n", obj.GetKind()) - c.storeCO(cacheObject{object: obj}) -} - -func (c *objectCache) storeAll(objs []meta.Object) { - for _, obj := range objs { - c.store(obj) - } -} - -func (c *objectCache) storeMeta(obj meta.Object) { - log.Debugf("cache: storing %s meta object\n", obj.GetKind()) - c.storeCO(cacheObject{object: obj, apiType: true}) -} - -func (c *objectCache) storeAllMeta(objs []meta.Object) { - for _, obj := range objs { - if uids, ok := c.objects[obj.GroupVersionKind()]; ok { - if _, ok := uids[obj.GetUID()]; ok { - continue - } - } - - c.storeMeta(obj) - } -} - -func (c *objectCache) delete(gvk schema.GroupVersionKind, uid meta.UID) { - if uids, ok := c.objects[gvk]; ok { - delete(uids, uid) - } -} - -func (c *objectCache) count(gvk schema.GroupVersionKind) uint64 { - count := uint64(len(c.objects[gvk])) - log.Debugf("cache: counted %d %s objects\n", count, gvk.Kind) - return count -} - -func (c *objectCache) list(gvk schema.GroupVersionKind) ([]meta.Object, error) { - uids := c.objects[gvk] - list := make([]meta.Object, 0, len(uids)) - - for _, obj := range uids { - if result, err := c.loadFull(obj); err == nil { - list = append(list, result) - } else { - return nil, err - } - } - - return list, nil -} - -func (c *objectCache) listMeta(gvk schema.GroupVersionKind) ([]meta.Object, error) { - uids := c.objects[gvk] - list := make([]meta.Object, 0, len(uids)) - - for _, obj := range uids { - apiType := obj.object - - if !obj.apiType { - apiType = meta.APITypeFrom(obj.object) - } - - list = append(list, apiType) - } - - return list, nil -} diff --git a/pkg/storage/cache/cache.go b/pkg/storage/cache/cache.go new file mode 100644 index 000000000..b9a5ec13a --- /dev/null +++ b/pkg/storage/cache/cache.go @@ -0,0 +1,168 @@ +package cache + +import ( + log "github.com/sirupsen/logrus" + meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" + "github.com/weaveworks/ignite/pkg/storage" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// Cache is an intermediate caching layer, which conforms to Storage +// Typically you back the cache with an actual storage +type Cache interface { + storage.Storage + // Flush is used to write the state of the entire cache to storage + // Warning: this is a very expensive operation + Flush() error +} + +type cache struct { + // storage is the backing Storage for the cache + // used to look up non-cached Objects + storage storage.Storage + + // index caches the Objects by GroupVersionKind and UID + // This guarantees uniqueness when looking up a specific Object + index *index +} + +var _ Cache = &cache{} + +func NewCache(backingStorage storage.Storage) Cache { + c := &cache{ + storage: backingStorage, + index: newIndex(backingStorage), + } + + return c +} + +func (c *cache) New(gvk schema.GroupVersionKind) (obj meta.Object, err error) { + // Request the storage to create the Object + obj, err = c.storage.New(gvk) + + // If no errors occurred, cache it + if err == nil { + err = c.index.store(obj) + } + + return +} + +func (c *cache) Get(gvk schema.GroupVersionKind, uid meta.UID) (obj meta.Object, err error) { + log.Tracef("cache: Get %s with UID %q", gvk.Kind, uid) + + // If the requested Object resides in the cache, return it + if obj, err = c.index.loadByID(gvk, uid); err != nil || obj != nil { + return + } + + // Request the Object from the storage + obj, err = c.storage.Get(gvk, uid) + + // If no errors occurred, cache it + if err == nil { + err = c.index.store(obj) + } + + return +} + +func (c *cache) GetMeta(gvk schema.GroupVersionKind, uid meta.UID) (obj meta.Object, err error) { + log.Tracef("cache: GetMeta %s with UID %q", gvk.Kind, uid) + + obj, err = c.storage.GetMeta(gvk, uid) + + // If no errors occurred while loading, store the Object in the cache + if err == nil { + err = c.index.storeMeta(obj) + } + + return +} + +func (c *cache) Set(gvk schema.GroupVersionKind, obj meta.Object) error { + log.Tracef("cache: Set %s with UID %q", gvk.Kind, obj.GetUID()) + + // Store the changed Object in the cache + if err := c.index.store(obj); err != nil { + return err + } + + // TODO: For now the cache always flushes, we might add automatic flushing later + return c.storage.Set(gvk, obj) +} + +func (c *cache) Patch(gvk schema.GroupVersionKind, uid meta.UID, patch []byte) error { + // TODO: For now patches are always flushed, the cache will load the updated Object on-demand on access + return c.storage.Patch(gvk, uid, patch) +} + +func (c *cache) Delete(gvk schema.GroupVersionKind, uid meta.UID) error { + log.Tracef("cache: Delete %s with UID %q", gvk.Kind, uid) + + // Delete the given Object from the cache and storage + c.index.delete(gvk, uid) + return c.storage.Delete(gvk, uid) +} + +type listFunc func(gvk schema.GroupVersionKind) ([]meta.Object, error) +type cacheStoreFunc func([]meta.Object) error + +// list is a common handler for List and ListMeta +func (c *cache) list(gvk schema.GroupVersionKind, slf, clf listFunc, csf cacheStoreFunc) (objs []meta.Object, err error) { + var storageCount uint64 + if storageCount, err = c.storage.Count(gvk); err != nil { + return + } + + if c.index.count(gvk) != storageCount { + log.Tracef("cache: miss when listing: %s", gvk) + // If the cache doesn't track all of the Objects, request them from the storage + if objs, err = slf(gvk); err != nil { + // If no errors occurred, store the Objects in the cache + err = csf(objs) + } + } else { + log.Tracef("cache: hit when listing: %s", gvk) + // If the cache tracks everything, return the cache's contents + objs, err = clf(gvk) + } + + return +} + +func (c *cache) List(gvk schema.GroupVersionKind) ([]meta.Object, error) { + return c.list(gvk, c.storage.List, c.index.list, c.index.storeAll) +} + +func (c *cache) ListMeta(gvk schema.GroupVersionKind) ([]meta.Object, error) { + return c.list(gvk, c.storage.ListMeta, c.index.listMeta, c.index.storeAllMeta) +} + +func (c *cache) Count(gvk schema.GroupVersionKind) (uint64, error) { + // The cache is transparent about how many items it has cached + return c.storage.Count(gvk) +} + +func (c *cache) Checksum(gvk schema.GroupVersionKind, uid meta.UID) (string, error) { + // The cache is transparent about the checksums + return c.storage.Checksum(gvk, uid) +} + +func (c *cache) Flush() error { + // Load the entire cache + allObjects, err := c.index.loadAll() + if err != nil { + return err + } + + for _, obj := range allObjects { + // Request the storage to save each Object + if err := c.storage.Set(obj.GroupVersionKind(), obj); err != nil { + return err + } + } + + return nil +} diff --git a/pkg/storage/cache/index.go b/pkg/storage/cache/index.go new file mode 100644 index 000000000..1523fa6d8 --- /dev/null +++ b/pkg/storage/cache/index.go @@ -0,0 +1,149 @@ +package cache + +import ( + log "github.com/sirupsen/logrus" + meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" + "github.com/weaveworks/ignite/pkg/storage" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type index struct { + storage storage.Storage + objects map[schema.GroupVersionKind]map[meta.UID]*cacheObject +} + +func newIndex(storage storage.Storage) *index { + return &index{ + storage: storage, + objects: make(map[schema.GroupVersionKind]map[meta.UID]*cacheObject), + } +} + +func (i *index) loadByID(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) { + if uids, ok := i.objects[gvk]; ok { + if obj, ok := uids[uid]; ok { + log.Tracef("index: cache hit for %s with UID %q", gvk.Kind, uid) + return obj.loadFull() + } + } + + log.Tracef("index: cache miss for %s with UID %q", gvk.Kind, uid) + return nil, nil +} + +func (i *index) load(obj meta.Object) (meta.Object, error) { + return i.loadByID(obj.GroupVersionKind(), obj.GetUID()) +} + +func (i *index) loadAll() ([]meta.Object, error) { + var size uint64 + + for gvk := range i.objects { + size += i.count(gvk) + } + + all := make([]meta.Object, 0, size) + + for gvk := range i.objects { + if objects, err := i.list(gvk); err == nil { + all = append(all, objects...) + } else { + return nil, err + } + } + + return all, nil +} + +func store(i *index, obj meta.Object, apiType bool) error { + co, err := newCacheObject(i.storage, obj, apiType) + if err != nil { + return err + } + + gvk := co.object.GroupVersionKind() + + if _, ok := i.objects[gvk]; !ok { + i.objects[gvk] = make(map[meta.UID]*cacheObject) + } + + log.Tracef("index: storing %s object with UID %q, meta: %t", gvk.Kind, obj.GetName(), apiType) + i.objects[gvk][co.object.GetUID()] = co + + return nil +} + +func (i *index) store(obj meta.Object) error { + return store(i, obj, false) +} + +func (i *index) storeAll(objs []meta.Object) (err error) { + for _, obj := range objs { + if err = i.store(obj); err != nil { + break + } + } + + return +} + +func (i *index) storeMeta(obj meta.Object) error { + return store(i, obj, true) +} + +func (i *index) storeAllMeta(objs []meta.Object) (err error) { + for _, obj := range objs { + if uids, ok := i.objects[obj.GroupVersionKind()]; ok { + if _, ok := uids[obj.GetUID()]; ok { + continue + } + } + + if err = i.storeMeta(obj); err != nil { + break + } + } + + return +} + +func (i *index) delete(gvk schema.GroupVersionKind, uid meta.UID) { + if uids, ok := i.objects[gvk]; ok { + delete(uids, uid) + } +} + +func (i *index) count(gvk schema.GroupVersionKind) (count uint64) { + count = uint64(len(i.objects[gvk])) + log.Tracef("index: counted %d %s object(s)", count, gvk.Kind) + return +} + +func list(i *index, gvk schema.GroupVersionKind, apiTypes bool) ([]meta.Object, error) { + uids := i.objects[gvk] + list := make([]meta.Object, 0, len(uids)) + + log.Tracef("index: listing %s objects, meta: %t", gvk, apiTypes) + for _, obj := range uids { + loadFunc := obj.loadFull + if apiTypes { + loadFunc = obj.loadAPI + } + + if result, err := loadFunc(); err != nil { + return nil, err + } else { + list = append(list, result) + } + } + + return list, nil +} + +func (i *index) list(gvk schema.GroupVersionKind) ([]meta.Object, error) { + return list(i, gvk, false) +} + +func (i *index) listMeta(gvk schema.GroupVersionKind) ([]meta.Object, error) { + return list(i, gvk, true) +} diff --git a/pkg/storage/cache/object.go b/pkg/storage/cache/object.go new file mode 100644 index 000000000..c2285d0c7 --- /dev/null +++ b/pkg/storage/cache/object.go @@ -0,0 +1,91 @@ +package cache + +import ( + log "github.com/sirupsen/logrus" + meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" + "github.com/weaveworks/ignite/pkg/storage" +) + +type cacheObject struct { + storage storage.Storage + object meta.Object + checksum string + apiType bool +} + +func newCacheObject(s storage.Storage, object meta.Object, apiType bool) (c *cacheObject, err error) { + c = &cacheObject{ + storage: s, + object: object, + apiType: apiType, + } + + if c.checksum, err = s.Checksum(c.object.GroupVersionKind(), c.object.GetUID()); err != nil { + c = nil + } + + return +} + +// loadFull returns the full Object, loading it only if it hasn't been cached before or the checksum has changed +func (c *cacheObject) loadFull() (meta.Object, error) { + var checksum string + reload := c.apiType + + if !reload { + if chk, err := c.storage.Checksum(c.object.GroupVersionKind(), c.object.GetUID()); err != nil { + return nil, err + } else if chk != c.checksum { + log.Tracef("cacheObject: %q invalidated, checksum mismatch: %q -> %q", c.object.GetName(), c.checksum, chk) + checksum = chk + reload = true + } else { + log.Tracef("cacheObject: %q checksum: %q", c.object.GetName(), c.checksum) + } + } + + if reload { + log.Tracef("cacheObject: full load triggered for %q", c.object.GetName()) + obj, err := c.storage.Get(c.object.GroupVersionKind(), c.object.GetUID()) + if err != nil { + return nil, err + } + + // Only apply the change after a successful Get + c.object = obj + c.apiType = false + + if len(checksum) > 0 { + c.checksum = checksum + } + } + + return c.object, nil +} + +// loadAPI returns the APIType of the Object, loading it only if the checksum has changed +func (c *cacheObject) loadAPI() (meta.Object, error) { + if chk, err := c.storage.Checksum(c.object.GroupVersionKind(), c.object.GetUID()); err != nil { + return nil, err + } else if chk != c.checksum { + log.Tracef("cacheObject: %q invalidated, checksum mismatch: %q -> %q", c.object.GetName(), c.checksum, chk) + log.Tracef("cacheObject: API load triggered for %q", c.object.GetName()) + obj, err := c.storage.GetMeta(c.object.GroupVersionKind(), c.object.GetUID()) + if err != nil { + return nil, err + } + + // Only apply the change after a successful GetMeta + c.object = obj + c.checksum = chk + c.apiType = true + } else { + log.Tracef("cacheObject: %q checksum: %q", c.object.GetName(), c.checksum) + } + + if c.apiType { + return c.object, nil + } + + return meta.APITypeFrom(c.object), nil +} diff --git a/pkg/storage/filterer/filterer.go b/pkg/storage/filterer/filterer.go index 555b62f94..a099ad111 100644 --- a/pkg/storage/filterer/filterer.go +++ b/pkg/storage/filterer/filterer.go @@ -5,7 +5,6 @@ import ( meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" "github.com/weaveworks/ignite/pkg/storage" - "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/storage/manifest/rawstorage.go b/pkg/storage/manifest/rawstorage.go index 22e8e9f3a..77c5ed8be 100644 --- a/pkg/storage/manifest/rawstorage.go +++ b/pkg/storage/manifest/rawstorage.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "regexp" + "strconv" "strings" log "github.com/sirupsen/logrus" @@ -59,6 +60,8 @@ type ManifestRawStorage struct { passthrough storage.RawStorage } +var _ storage.RawStorage = &ManifestRawStorage{} + func (r *ManifestRawStorage) Sync() (UpdatedFiles, error) { // provide empty placeholders for new data, overwrite .keyFileMap and .byKind in the end newKeyFileMap := map[string]*UpdatedFile{} @@ -287,3 +290,17 @@ func (r *ManifestRawStorage) List(parentKey string) ([]string, error) { return r.byKind[parentKey], nil } + +// This returns the modification time as a UnixNano string +// If the file doesn't exist, return blank +func (r *ManifestRawStorage) Checksum(key string) (s string, err error) { + var fi os.FileInfo + + if r.Exists(key) { + if fi, err = os.Stat(r.realPath(key)); err == nil { + s = strconv.FormatInt(fi.ModTime().UnixNano(), 10) + } + } + + return +} diff --git a/pkg/storage/rawstorage.go b/pkg/storage/rawstorage.go index 421c55e3b..990a2d34a 100644 --- a/pkg/storage/rawstorage.go +++ b/pkg/storage/rawstorage.go @@ -4,6 +4,7 @@ import ( "io/ioutil" "os" "path" + "strconv" "strings" "github.com/weaveworks/ignite/pkg/constants" @@ -16,6 +17,7 @@ type RawStorage interface { Write(key string, content []byte) error Delete(key string) error List(directory string) ([]string, error) + Checksum(key string) (string, error) } func NewDefaultRawStorage(dir string) RawStorage { @@ -87,3 +89,17 @@ func (r *DefaultRawStorage) List(parentKey string) ([]string, error) { return result, nil } + +// This returns the modification time as a UnixNano string +// If the file doesn't exist, return blank +func (r *DefaultRawStorage) Checksum(key string) (s string, err error) { + var fi os.FileInfo + + if r.Exists(key) { + if fi, err = os.Stat(r.realPath(key)); err == nil { + s = strconv.FormatInt(fi.ModTime().UnixNano(), 10) + } + } + + return +} diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 3eed9de42..5bd3f81b7 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -15,27 +15,34 @@ import ( // Storage is an interface for persisting and retrieving API objects to/from a backend // One Storage instance handles all different Kinds of Objects type Storage interface { - // New creates a new object for the specified kind + // New creates a new Object for the specified kind New(gvk schema.GroupVersionKind) (meta.Object, error) // Get returns a new Object for the resource at the specified kind/uid path, based on the file content Get(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) - // Set saves the Object to disk. If the object does not exist, the + // GetMeta returns a new Object's APIType representation for the resource at the specified kind/uid path + GetMeta(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) + // Set saves the Object to disk. If the Object does not exist, the // ObjectMeta.Created field is set automatically Set(gvk schema.GroupVersionKind, obj meta.Object) error - // Patch performs a strategic merge patch on the object with the given UID, using the byte-encoded patch given + // Patch performs a strategic merge patch on the Object with the given UID, using the byte-encoded patch given Patch(gvk schema.GroupVersionKind, uid meta.UID, patch []byte) error - // Delete removes an object from the storage + // Delete removes an Object from the storage Delete(gvk schema.GroupVersionKind, uid meta.UID) error - // List lists objects for the specific kind + // List lists Objects for the specific kind List(gvk schema.GroupVersionKind) ([]meta.Object, error) - // ListMeta lists all objects' APIType representation. In other words, - // only metadata about each object is unmarshalled (uid/name/kind/apiVersion). + // ListMeta lists all Objects' APIType representation. In other words, + // only metadata about each Object is unmarshalled (uid/name/kind/apiVersion). // This allows for faster runs (no need to unmarshal "the world"), and less // resource usage, when only metadata is unmarshalled into memory ListMeta(gvk schema.GroupVersionKind) ([]meta.Object, error) // Count returns the amount of available Objects of a specific kind - // This is used by Caches to check if all objects are cached to perform a List + // This is used by Caches to check if all Objects are cached to perform a List Count(gvk schema.GroupVersionKind) (uint64, error) + // Checksum returns a string representing the state of an Object on disk + // The checksum should change if any modifications have been made to the + // Object on disk, it can be e.g. the Object's modification timestamp or + // calculated checksum + Checksum(gvk schema.GroupVersionKind, uid meta.UID) (string, error) } // NewGenericStorage constructs a new Storage @@ -51,7 +58,7 @@ type GenericStorage struct { var _ Storage = &GenericStorage{} -// New creates a new object for the specified kind +// New creates a new Object for the specified kind // TODO: Create better error handling if the GVK specified is not recognized func (s *GenericStorage) New(gvk schema.GroupVersionKind) (meta.Object, error) { obj, err := s.serializer.Scheme().New(gvk) @@ -59,7 +66,7 @@ func (s *GenericStorage) New(gvk schema.GroupVersionKind) (meta.Object, error) { return nil, err } - // Default either through the scheme, or the high-level serializer object + // Default either through the scheme, or the high-level serializer Object if gvk.Version == runtime.APIVersionInternal { if err := s.serializer.DefaultInternal(obj); err != nil { return nil, err @@ -73,11 +80,11 @@ func (s *GenericStorage) New(gvk schema.GroupVersionKind) (meta.Object, error) { if !ok { return nil, fmt.Errorf("can't convert to ignite object") } - // Set the desired gvk from the caller of this object + // Set the desired gvk from the caller of this Object // In practice, this means, although we created an internal type, // from defaulting external TypeMeta information was set. Set the // desired gvk here so it's correctly handled in all code that gets - // the gvk from the object + // the gvk from the Object metaObj.SetGroupVersionKind(gvk) return metaObj, nil } @@ -89,9 +96,22 @@ func (s *GenericStorage) Get(gvk schema.GroupVersionKind, uid meta.UID) (meta.Ob if err != nil { return nil, err } + return s.decode(content, gvk) } +// TODO: Verify this works +// GetMeta returns a new Object's APIType representation for the resource at the specified kind/uid path +func (s *GenericStorage) GetMeta(gvk schema.GroupVersionKind, uid meta.UID) (meta.Object, error) { + storageKey := KeyForUID(gvk, uid) + content, err := s.raw.Read(storageKey) + if err != nil { + return nil, err + } + + return s.decodeMeta(content, gvk) +} + // Set saves the Object to disk func (s *GenericStorage) Set(gvk schema.GroupVersionKind, obj meta.Object) error { b, err := s.serializer.EncodeJSON(obj) @@ -119,13 +139,13 @@ func (s *GenericStorage) Patch(gvk schema.GroupVersionKind, uid meta.UID, patch return s.raw.Write(storageKey, newContent) } -// Delete removes an object from the storage +// Delete removes an Object from the storage func (s *GenericStorage) Delete(gvk schema.GroupVersionKind, uid meta.UID) error { storageKey := KeyForUID(gvk, uid) return s.raw.Delete(storageKey) } -// List lists objects for the specific kind +// List lists Objects for the specific kind func (s *GenericStorage) List(gvk schema.GroupVersionKind) (result []meta.Object, walkerr error) { walkerr = s.walkKind(gvk, func(content []byte) error { obj, err := s.decode(content, gvk) @@ -139,8 +159,8 @@ func (s *GenericStorage) List(gvk schema.GroupVersionKind) (result []meta.Object return } -// ListMeta lists all objects' APIType representation. In other words, -// only metadata about each object is unmarshalled (uid/name/kind/apiVersion). +// ListMeta lists all Objects' APIType representation. In other words, +// only metadata about each Object is unmarshalled (uid/name/kind/apiVersion). // This allows for faster runs (no need to unmarshal "the world"), and less // resource usage, when only metadata is unmarshalled into memory func (s *GenericStorage) ListMeta(gvk schema.GroupVersionKind) (result []meta.Object, walkerr error) { @@ -150,9 +170,9 @@ func (s *GenericStorage) ListMeta(gvk schema.GroupVersionKind) (result []meta.Ob if err := yaml.Unmarshal(content, obj); err != nil { return err } - // Set the desired gvk from the caller of this object + // Set the desired gvk from the caller of this Object // In practice, this means, although we got an external type, - // we might want internal objects later in the client. Hence, + // we might want internal Objects later in the client. Hence, // set the right expectation here obj.SetGroupVersionKind(gvk) @@ -162,30 +182,52 @@ func (s *GenericStorage) ListMeta(gvk schema.GroupVersionKind) (result []meta.Ob return } -// Count counts the objects for the specific kind +// Count counts the Objects for the specific kind func (s *GenericStorage) Count(gvk schema.GroupVersionKind) (uint64, error) { entries, err := s.raw.List(KeyForKind(gvk)) return uint64(len(entries)), err } +// Checksum returns a string representing the state of an Object on disk +func (s *GenericStorage) Checksum(gvk schema.GroupVersionKind, uid meta.UID) (string, error) { + return s.raw.Checksum(KeyForUID(gvk, uid)) +} + func (s *GenericStorage) decode(content []byte, gvk schema.GroupVersionKind) (meta.Object, error) { - // Decode the bytes to the internal version of the object, if desired + // Decode the bytes to the internal version of the Object, if desired isInternal := gvk.Version == runtime.APIVersionInternal - // Decode the bytes into an object + + // Decode the bytes into an Object obj, err := s.serializer.Decode(content, isInternal) if err != nil { return nil, err } + // Cast to meta.Object, and make sure it works metaObj, ok := obj.(meta.Object) if !ok { return nil, fmt.Errorf("can't convert to ignite object") } - // Set the desired gvk from the caller of this object + + // Set the desired gvk of this Object from the caller metaObj.SetGroupVersionKind(gvk) return metaObj, nil } +func (s *GenericStorage) decodeMeta(content []byte, gvk schema.GroupVersionKind) (meta.Object, error) { + // Create a new APType object + obj := meta.NewAPIType() + + // Decode the bytes into the APIType object + if err := s.serializer.DecodeInto(content, obj); err != nil { + return nil, err + } + + // Set the desired gvk of this APIType object from the caller + obj.SetGroupVersionKind(gvk) + return obj, nil +} + func (s *GenericStorage) walkKind(gvk schema.GroupVersionKind, fn func(content []byte) error) error { kindKey := KeyForKind(gvk) entries, err := s.raw.List(kindKey) diff --git a/pkg/util/patch/patch.go b/pkg/util/patch/patch.go index d4fd68573..6f25fb0d8 100644 --- a/pkg/util/patch/patch.go +++ b/pkg/util/patch/patch.go @@ -5,7 +5,6 @@ import ( "github.com/weaveworks/ignite/pkg/apis/ignite/scheme" meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/strategicpatch" )