Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d630232b
Commit
d630232b
authored
Jul 07, 2015
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10350 from mdevilliers/fix_golang_client_doc
Align example in the client package with the api.
parents
f2adea25
ab40fca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
doc.go
pkg/client/doc.go
+6
-1
No files found.
pkg/client/doc.go
View file @
d630232b
...
@@ -21,6 +21,11 @@ and deleting pods, replication controllers, services, and minions.
...
@@ -21,6 +21,11 @@ and deleting pods, replication controllers, services, and minions.
Most consumers should use the Config object to create a Client:
Most consumers should use the Config object to create a Client:
import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
)
config := &client.Config{
config := &client.Config{
Host: "http://localhost:8080",
Host: "http://localhost:8080",
Username: "test",
Username: "test",
...
@@ -30,7 +35,7 @@ Most consumers should use the Config object to create a Client:
...
@@ -30,7 +35,7 @@ Most consumers should use the Config object to create a Client:
if err != nil {
if err != nil {
// handle error
// handle error
}
}
client.Pods(
ns).List(
)
client.Pods(
api.NamespaceDefault).List(labels.Everything(), fields.Everything()
)
More advanced consumers may wish to provide their own transport via a http.RoundTripper:
More advanced consumers may wish to provide their own transport via a http.RoundTripper:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment