Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Rework storage clients to support new interfaces, initial APIType cache
Browse files Browse the repository at this point in the history
  • Loading branch information
twelho committed Jul 6, 2019
1 parent 52b5da7 commit 9273c75
Show file tree
Hide file tree
Showing 12 changed files with 200 additions and 237 deletions.
31 changes: 16 additions & 15 deletions docs/api-reference/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var EmptySize = NewSizeFromBytes(0)



## <a name="APIType">type</a> [APIType](/src/target/meta.go?s=340:422#L18)
## <a name="APIType">type</a> [APIType](/src/target/meta.go?s=411:493#L19)
``` go
type APIType struct {
TypeMeta `json:",inline"`
Expand All @@ -83,6 +83,7 @@ type APIType struct {
APIType is a struct implementing Object, used for
unmarshalling unknown objects into this intermediate type
where .Name, .UID, .Kind and .APIVersion become easily available
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object



Expand All @@ -93,7 +94,7 @@ where .Name, .UID, .Kind and .APIVersion become easily available



## <a name="APITypeList">type</a> [APITypeList](/src/target/meta.go?s=482:509#L24)
## <a name="APITypeList">type</a> [APITypeList](/src/target/meta.go?s=580:607#L27)
``` go
type APITypeList []*APIType
```
Expand Down Expand Up @@ -179,7 +180,7 @@ func (i IPAddresses) String() string



## <a name="Kind">type</a> [Kind](/src/target/meta.go?s=701:717#L35)
## <a name="Kind">type</a> [Kind](/src/target/meta.go?s=799:815#L38)
``` go
type Kind string
```
Expand All @@ -200,7 +201,7 @@ const (



### <a name="Kind.String">func</a> (Kind) [String](/src/target/meta.go?s=897:926#L46)
### <a name="Kind.String">func</a> (Kind) [String](/src/target/meta.go?s=995:1024#L49)
``` go
func (k Kind) String() string
```
Expand All @@ -209,7 +210,7 @@ Returns a lowercase string representation of the Kind



### <a name="Kind.Upper">func</a> (Kind) [Upper](/src/target/meta.go?s=1094:1122#L58)
### <a name="Kind.Upper">func</a> (Kind) [Upper](/src/target/meta.go?s=1192:1220#L61)
``` go
func (k Kind) Upper() string
```
Expand All @@ -218,7 +219,7 @@ Returns a uppercase string representation of the Kind



## <a name="Object">type</a> [Object](/src/target/meta.go?s=2172:2336#L103)
## <a name="Object">type</a> [Object](/src/target/meta.go?s=2270:2434#L106)
``` go
type Object interface {
runtime.Object
Expand Down Expand Up @@ -247,7 +248,7 @@ extra GetName() and GetUID() methods from ObjectMeta



## <a name="ObjectMeta">type</a> [ObjectMeta](/src/target/meta.go?s=1306:1444#L65)
## <a name="ObjectMeta">type</a> [ObjectMeta](/src/target/meta.go?s=1404:1542#L68)
``` go
type ObjectMeta struct {
Name string `json:"name"`
Expand All @@ -269,7 +270,7 @@ implement the Object interface



### <a name="ObjectMeta.GetCreated">func</a> (\*ObjectMeta) [GetCreated](/src/target/meta.go?s=1882:1921#L92)
### <a name="ObjectMeta.GetCreated">func</a> (\*ObjectMeta) [GetCreated](/src/target/meta.go?s=1980:2019#L95)
``` go
func (o *ObjectMeta) GetCreated() *Time
```
Expand All @@ -278,7 +279,7 @@ GetCreated returns when the Object was created



### <a name="ObjectMeta.GetName">func</a> (\*ObjectMeta) [GetName](/src/target/meta.go?s=1488:1525#L72)
### <a name="ObjectMeta.GetName">func</a> (\*ObjectMeta) [GetName](/src/target/meta.go?s=1586:1623#L75)
``` go
func (o *ObjectMeta) GetName() string
```
Expand All @@ -287,7 +288,7 @@ GetName returns the name of the Object



### <a name="ObjectMeta.GetUID">func</a> (\*ObjectMeta) [GetUID](/src/target/meta.go?s=1687:1720#L82)
### <a name="ObjectMeta.GetUID">func</a> (\*ObjectMeta) [GetUID](/src/target/meta.go?s=1785:1818#L85)
``` go
func (o *ObjectMeta) GetUID() UID
```
Expand All @@ -296,7 +297,7 @@ GetUID returns the UID of the Object



### <a name="ObjectMeta.SetCreated">func</a> (\*ObjectMeta) [SetCreated](/src/target/meta.go?s=1995:2035#L97)
### <a name="ObjectMeta.SetCreated">func</a> (\*ObjectMeta) [SetCreated](/src/target/meta.go?s=2093:2133#L100)
``` go
func (o *ObjectMeta) SetCreated(t *Time)
```
Expand All @@ -305,7 +306,7 @@ SetCreated returns when the Object was created



### <a name="ObjectMeta.SetName">func</a> (\*ObjectMeta) [SetName](/src/target/meta.go?s=1585:1626#L77)
### <a name="ObjectMeta.SetName">func</a> (\*ObjectMeta) [SetName](/src/target/meta.go?s=1683:1724#L80)
``` go
func (o *ObjectMeta) SetName(name string)
```
Expand All @@ -314,7 +315,7 @@ SetName sets the name of the Object



### <a name="ObjectMeta.SetUID">func</a> (\*ObjectMeta) [SetUID](/src/target/meta.go?s=1777:1813#L87)
### <a name="ObjectMeta.SetUID">func</a> (\*ObjectMeta) [SetUID](/src/target/meta.go?s=1875:1911#L90)
``` go
func (o *ObjectMeta) SetUID(uid UID)
```
Expand Down Expand Up @@ -494,7 +495,7 @@ The default string for Time is a human readable difference between the Time and



## <a name="TypeMeta">type</a> [TypeMeta](/src/target/meta.go?s=598:639#L27)
## <a name="TypeMeta">type</a> [TypeMeta](/src/target/meta.go?s=696:737#L30)
``` go
type TypeMeta struct {
metav1.TypeMeta
Expand All @@ -512,7 +513,7 @@ TypeMeta is an alias for the k8s/apimachinery TypeMeta with some additional meth



### <a name="TypeMeta.GetKind">func</a> (\*TypeMeta) [GetKind](/src/target/meta.go?s=641:674#L31)
### <a name="TypeMeta.GetKind">func</a> (\*TypeMeta) [GetKind](/src/target/meta.go?s=739:772#L34)
``` go
func (t *TypeMeta) GetKind() Kind
```
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ require (
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/grpc v1.21.1 // indirect
gotest.tools v2.2.0+incompatible // indirect
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719
k8s.io/code-generator v0.0.0-20190703204957-583809a49343 // indirect
sigs.k8s.io/yaml v1.1.0
)
23 changes: 0 additions & 23 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiUOryc=
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
Expand Down Expand Up @@ -80,7 +79,6 @@ github.com/go-openapi/validate v0.17.1/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415 h1:WSBJMqJbLxsn+bTCPyPYZfqHdJmc8MK4wrBjMft6BAM=
github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
Expand Down Expand Up @@ -165,7 +163,6 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
Expand All @@ -192,11 +189,7 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -225,14 +218,7 @@ golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5f
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 h1:QjA/9ArTfVTLfEhClDCG7SGrZkZixxWpwNCDiwJfh88=
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
Expand All @@ -255,17 +241,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719 h1:uV4S5IB5g4Nvi+TBVNf3e9L4wrirlwYJ6w88jUQxTUw=
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA=
k8s.io/code-generator v0.0.0-20190703204957-583809a49343 h1:Pb9d9nrO7OKuo4h9QF9/U9eYgoEy9XeEC3tFl90chLw=
k8s.io/code-generator v0.0.0-20190703204957-583809a49343/go.mod h1:gZ0mjdzfPz3P+cILxibAJ25xFoZ1Kf0xQrFUHy66AEs=
k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af h1:SwjZbO0u5ZuaV6TRMWOGB40iaycX8sbdMQHtjNZ19dk=
k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68=
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
5 changes: 3 additions & 2 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ VM with a new IP address:
package client

import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
)

// NewClient constructs a new Client for the specified data directory
func NewClient(s storage.Storage) *Client {
return &Client{
storage: s,
dynamicClients: map[string]DynamicClient{},
dynamicClients: map[meta.Kind]DynamicClient{},
}
}

Expand All @@ -64,7 +65,7 @@ type Client struct {
vmClient VMClient
kernelClient KernelClient
imageClient ImageClient
dynamicClients map[string]DynamicClient
dynamicClients map[meta.Kind]DynamicClient
}

// DefaultClient is the default client that can be easily used
Expand Down
72 changes: 31 additions & 41 deletions pkg/client/client_dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,71 @@ package client
import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"
)

// DynamicClient is an interface for accessing API types generically
type DynamicClient interface {
storage.Cache

// Get returns a Resource object based on a reference string; which can either
// match the Resource's Name or UID, or be a prefix of the UID
Get(ref string) (meta.Object, error)
// Set saves a Resource into the persistent storage
// Get returns an Object based on the given filter, filters can
// match e.g. the Object's Name, UID or a specific property
Get(filter filterer.BaseFilter) (meta.Object, error)
// Set saves an Object into the persistent storage
Set(meta.Object) error
// Delete deletes the API object from the storage
// Delete deletes an Object from the storage
Delete(uid meta.UID) error
// List returns a list of all Resources available
// List returns a list of all Objects available
List() ([]meta.Object, error)
}

// Dynamic returns the DynamicClient for the Client instance, for the specific kind
func (c *Client) Dynamic(kind string) DynamicClient {
dc, ok := c.dynamicClients[kind]
if !ok {
c.dynamicClients[kind] = newDynamicClient(c.storage, kind)
dc = c.dynamicClients[kind]
func (c *Client) Dynamic(kind meta.Kind) (dc DynamicClient) {
var ok bool
if dc, ok = c.dynamicClients[kind]; !ok {
dc = newDynamicClient(c.storage, kind)
c.dynamicClients[kind] = dc
}
return dc

return
}

// Dynamic is a shorthand for accessing the DynamicClient using the default client
func Dynamic(kind string) DynamicClient {
func Dynamic(kind meta.Kind) DynamicClient {
return DefaultClient.Dynamic(kind)
}

// dynamicClient is a struct implementing the DynamicClient interface
// It uses a shared storage instance passed from the Client
// It uses a shared storage instance passed from the Client together with its own Filterer
type dynamicClient struct {
storage.Cache
storage storage.Storage
kind string
storage storage.Storage
kind meta.Kind
filterer *filterer.Filterer
}

// newDynamicClient builds the dynamicClient struct using the storage implementation
// It automatically fetches all metadata for all API types of the specific kind into the cache
func newDynamicClient(s storage.Storage, kind string) DynamicClient {
c, err := s.GetCache(kind)
if err != nil {
panic(err)
// newDynamicClient builds the dynamicClient struct using the storage implementation and a new Filterer
func newDynamicClient(s storage.Storage, kind meta.Kind) DynamicClient {
return &dynamicClient{
storage: s,
kind: kind,
filterer: filterer.NewFilterer(s),
}
return &dynamicClient{storage: s, Cache: c, kind: kind}
}

// Get returns a Resource object based on a reference string; which can either
// match the Resource's Name or UID, or be a prefix of the UID
func (c *dynamicClient) Get(ref string) (meta.Object, error) {
meta, err := c.MatchOne(ref)
if err != nil {
return nil, err
}
obj, err := c.storage.GetByID(meta.Kind, meta.UID)
if err != nil {
return nil, err
}
return obj, nil
// Get returns an Object based on a given Filter
func (c *dynamicClient) Get(filter filterer.BaseFilter) (meta.Object, error) {
return c.filterer.Find(c.kind, filter)
}

// Set saves a Resource into the persistent storage
// Set saves an Object into the persistent storage
func (c *dynamicClient) Set(resource meta.Object) error {
return c.storage.Set(resource)
}

// Delete deletes the API object from the storage
// Delete deletes the Object from the storage
func (c *dynamicClient) Delete(uid meta.UID) error {
return c.storage.Delete(c.kind, uid)
}

// List returns a list of all Resources available
// List returns a list of all Objects available
func (c *dynamicClient) List() ([]meta.Object, error) {
return c.storage.List(c.kind)
}
Loading

0 comments on commit 9273c75

Please sign in to comment.