github.com/etecs-ru/gnomock@v0.13.2/preset/redis/options.go (about)

     1  package redis
     2  
     3  // Option is an optional configuration of this Gnomock preset. Use available
     4  // Options to configure the container
     5  type Option func(*P)
     6  
     7  // WithValues initializes Redis with the provided key/value pairs. These values
     8  // never expire. See go-redis/redis package for information on supported value
     9  // types
    10  func WithValues(vs map[string]interface{}) Option {
    11  	return func(p *P) {
    12  		p.Values = vs
    13  	}
    14  }
    15  
    16  // WithVersion sets image version.
    17  func WithVersion(version string) Option {
    18  	return func(o *P) {
    19  		o.Version = version
    20  	}
    21  }