Documentation ¶
Index ¶
- Variables
- type Options
- func (o Options) GetStorage(capacity int, objectType runtime.Object, resourcePrefix string, ...) (storage.Interface, factory.DestroyFunc)
- func (o Options) KeyFunc(namespaced bool) func(genericapirequest.Context, string) (string, error)
- func (o Options) KeyRootFunc() func(genericapirequest.Context) string
- func (o Options) ResourcePrefix() string
- func (o Options) StorageType() (StorageType, error)
- type StorageType
Constants ¶
This section is empty.
Variables ¶
var ( // Scheme for API object types Scheme = runtime.NewScheme() // ParameterCodec handles versioning of objects that are converted to query parameters. ParameterCodec = runtime.NewParameterCodec(Scheme) // Codecs for creating a server config Codecs = serializer.NewCodecFactory(Scheme) )
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { EtcdOptions etcd.Options TPROptions tpr.Options // contains filtered or unexported fields }
Options is the extension of a generic.RESTOptions struct, complete with service-catalog specific things
func NewOptions ¶
NewOptions returns a new Options with the given parameters
func (Options) GetStorage ¶
func (o Options) GetStorage( capacity int, objectType runtime.Object, resourcePrefix string, scopeStrategy rest.NamespaceScopedStrategy, newListFunc func() runtime.Object, getAttrsFunc storage.AttrFunc, trigger storage.TriggerPublisherFunc, ) (storage.Interface, factory.DestroyFunc)
GetStorage returns the storage from the given parameters
func (Options) KeyFunc ¶
KeyFunc returns the appropriate key function for the storage type in o. This function should produce a path that etcd or TPR storage understands, to the resource by combining the namespace in the context with the given prefix
func (Options) KeyRootFunc ¶
func (o Options) KeyRootFunc() func(genericapirequest.Context) string
KeyRootFunc returns the appropriate key root function for the storage type in o. This function produces a path that etcd or TPR storage understands, to the root of the resource by combining the namespace in the context with the given prefix
func (Options) ResourcePrefix ¶
ResourcePrefix gets the resource prefix of all etcd keys
func (Options) StorageType ¶
func (o Options) StorageType() (StorageType, error)
StorageType returns the storage type the rest server should use, or an error if an unsupported storage type is indicated
type StorageType ¶
type StorageType string
StorageType represents the type of storage a storage interface should use
const ( // StorageTypeTPR indicates a storage interface should use TPRs // TPRs StorageTypeTPR StorageType = "tpr" // StorageTypeEtcd indicates a storage interface should use etcd StorageTypeEtcd StorageType = "etcd" )
func StorageTypeFromString ¶
func StorageTypeFromString(s string) (StorageType, error)
StorageTypeFromString converts s to a valid StorageType. Returns StorageType("") and a non-nil error if s names an invalid or unsupported storage type
func (StorageType) String ¶
func (s StorageType) String() string