github.com/yandex/pandora@v0.5.32/components/grpc/import/import.go (about) 1 package example 2 3 import ( 4 "github.com/spf13/afero" 5 "github.com/yandex/pandora/components/guns/grpc" 6 "github.com/yandex/pandora/components/guns/grpc/scenario" 7 "github.com/yandex/pandora/components/providers/grpc/grpcjson" 8 "github.com/yandex/pandora/core" 9 "github.com/yandex/pandora/core/register" 10 ) 11 12 func Import(fs afero.Fs) { 13 14 register.Provider("grpc/json", func(conf grpcjson.Config) core.Provider { 15 return grpcjson.NewProvider(fs, conf) 16 }) 17 18 register.Gun("grpc", grpc.NewGun, grpc.DefaultGunConfig) 19 register.Gun("grpc/scenario", scenario.NewGun, scenario.DefaultGunConfig) 20 }