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
ad3876c1
Commit
ad3876c1
authored
Aug 05, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12271 from pweil-/expose-codec
expose codec in storage
parents
3fe0fafd
2a61b55b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
etcd_helper.go
pkg/storage/etcd/etcd_helper.go
+5
-0
interfaces.go
pkg/storage/interfaces.go
+4
-1
No files found.
pkg/storage/etcd/etcd_helper.go
View file @
ad3876c1
...
@@ -72,6 +72,11 @@ func init() {
...
@@ -72,6 +72,11 @@ func init() {
metrics
.
Register
()
metrics
.
Register
()
}
}
// Codec provides access to the underlying codec being used by the implementation.
func
(
h
*
etcdHelper
)
Codec
()
runtime
.
Codec
{
return
h
.
codec
}
// Implements storage.Interface.
// Implements storage.Interface.
func
(
h
*
etcdHelper
)
Backends
()
[]
string
{
func
(
h
*
etcdHelper
)
Backends
()
[]
string
{
return
h
.
client
.
GetCluster
()
return
h
.
client
.
GetCluster
()
...
...
pkg/storage/interfaces.go
View file @
ad3876c1
...
@@ -69,7 +69,7 @@ func Everything(runtime.Object) bool {
...
@@ -69,7 +69,7 @@ func Everything(runtime.Object) bool {
type
UpdateFunc
func
(
input
runtime
.
Object
,
res
ResponseMeta
)
(
output
runtime
.
Object
,
ttl
*
uint64
,
err
error
)
type
UpdateFunc
func
(
input
runtime
.
Object
,
res
ResponseMeta
)
(
output
runtime
.
Object
,
ttl
*
uint64
,
err
error
)
// Interface offers a common interface for object marshaling/unmarshling operations and
// Interface offers a common interface for object marshaling/unmarshling operations and
// hids all the storage-related operations behind it.
// hid
e
s all the storage-related operations behind it.
type
Interface
interface
{
type
Interface
interface
{
// Returns list of servers addresses of the underyling database.
// Returns list of servers addresses of the underyling database.
// TODO: This method is used only in a single place. Consider refactoring and getting rid
// TODO: This method is used only in a single place. Consider refactoring and getting rid
...
@@ -146,4 +146,7 @@ type Interface interface {
...
@@ -146,4 +146,7 @@ type Interface interface {
// }
// }
// })
// })
GuaranteedUpdate
(
key
string
,
ptrToType
runtime
.
Object
,
ignoreNotFound
bool
,
tryUpdate
UpdateFunc
)
error
GuaranteedUpdate
(
key
string
,
ptrToType
runtime
.
Object
,
ignoreNotFound
bool
,
tryUpdate
UpdateFunc
)
error
// Codec provides access to the underlying codec being used by the implementation.
Codec
()
runtime
.
Codec
}
}
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