Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(factory FactoryFunc)
Types ¶
type FactoryFunc ¶
type FactoryFunc func(env *common.MockEnvironment, storage storage.Storage) MockService
type MockService ¶
type MockService interface { // Register initializes the service, normally registering the GRPC service. Register(grpcServer *grpc.Server) // NewHTTPMux creates an HTTP mux for serving http traffic NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error) // ExpectedHosts is the hostname(s) we serve on e.g. foo.googleapis.com // We also support patterns like `{region}-foo.googleapis.com` ExpectedHosts() []string }
MockService is the interface implemented by all services
type Normalizer ¶
type Normalizer interface {
ConfigureVisitor(url string, replacements NormalizingVisitor)
}
type NormalizingVisitor ¶
type Services ¶
type Services struct {
Services []MockService
}
func BuildAllServices ¶
func (*Services) ConfigureVisitor ¶
func (s *Services) ConfigureVisitor(url string, visitor NormalizingVisitor)
type SupportsNormalization ¶
type SupportsNormalization interface {
ConfigureVisitor(url string, replacements NormalizingVisitor)
}
SupportsNormalization can be implemented to support normalization
Click to show internal directories.
Click to hide internal directories.