Skip to content

Commit 8dab940

Browse files
committed
Fix client-related comments
1 parent 8f8247f commit 8dab940

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pkg/client/client.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ type CacheOptions struct {
9090
type NewClientFunc func(config *rest.Config, options Options) (Client, error)
9191

9292
// New returns a new Client using the provided config and Options.
93-
// The returned client reads *and* writes directly from the server
94-
// (it doesn't use object caches). It understands how to work with
95-
// normal types (both custom resources and aggregated/built-in resources),
96-
// as well as unstructured types.
93+
// The returned client reads from a local cache or directly from the API server,
94+
// and writes are always performed directly on the API server.
95+
// (read operations may use object caches, but write operations do not).
96+
// It understands how to work with normal types (both custom resources
97+
// and aggregated/built-in resources), as well as unstructured types.
9798
//
9899
// In the case of normal types, the scheme will be used to look up the
99100
// corresponding group, version, and kind for the given type. In the
@@ -210,7 +211,8 @@ func newClient(config *rest.Config, options Options) (*client, error) {
210211

211212
var _ Client = &client{}
212213

213-
// client is a client.Client that reads and writes directly from/to an API server.
214+
// client is a client.Client configured to either read from a local cache or directly from the API server.
215+
// Write operations are always performed directly on the API server.
214216
// It lazily initializes new clients at the time they are used.
215217
type client struct {
216218
typedClient typedClient

0 commit comments

Comments
 (0)