gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/store/options.go (about)

     1  package store
     2  
     3  import (
     4  	"gitee.com/liuxuezhan/go-micro-v1.18.0/config/options"
     5  )
     6  
     7  // Nodes is a list of nodes used to back the store
     8  func Nodes(a ...string) options.Option {
     9  	return options.WithValue("store.nodes", a)
    10  }
    11  
    12  // Prefix sets a prefix to any key ids used
    13  func Prefix(p string) options.Option {
    14  	return options.WithValue("store.prefix", p)
    15  }
    16  
    17  // Namespace offers a way to have multiple isolated
    18  // stores in the same backend, if supported.
    19  func Namespace(n string) options.Option {
    20  	return options.WithValue("store.namespace", n)
    21  }