mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
This commit is contained in:
@@ -31,7 +31,7 @@ type BindingStorage struct {
|
||||
registry Registry
|
||||
}
|
||||
|
||||
// NewBindingStorage makes a new BindingStorage backed by the given bindingRegistry.
|
||||
// NewBindingStorage creates a new BindingStorage backed by the given bindingRegistry.
|
||||
func NewBindingStorage(bindingRegistry Registry) *BindingStorage {
|
||||
return &BindingStorage{
|
||||
registry: bindingRegistry,
|
||||
|
@@ -37,12 +37,12 @@ func NewStorage(registry Registry) apiserver.RESTStorage {
|
||||
}
|
||||
}
|
||||
|
||||
// Get satisfies the RESTStorage interface but is unimplemented
|
||||
// Get satisfies the RESTStorage interface but is unimplemented.
|
||||
func (rs *Storage) Get(id string) (interface{}, error) {
|
||||
return rs.registry.GetEndpoints(id)
|
||||
}
|
||||
|
||||
// List satisfies the RESTStorage interface but is unimplemented
|
||||
// List satisfies the RESTStorage interface but is unimplemented.
|
||||
func (rs *Storage) List(selector labels.Selector) (interface{}, error) {
|
||||
return nil, errors.New("unimplemented")
|
||||
}
|
||||
@@ -53,22 +53,22 @@ func (rs *Storage) Watch(label, field labels.Selector, resourceVersion uint64) (
|
||||
return rs.registry.WatchEndpoints(label, field, resourceVersion)
|
||||
}
|
||||
|
||||
// Create satisfies the RESTStorage interface but is unimplemented
|
||||
// Create satisfies the RESTStorage interface but is unimplemented.
|
||||
func (rs *Storage) Create(obj interface{}) (<-chan interface{}, error) {
|
||||
return nil, errors.New("unimplemented")
|
||||
}
|
||||
|
||||
// Update satisfies the RESTStorage interface but is unimplemented
|
||||
// Update satisfies the RESTStorage interface but is unimplemented.
|
||||
func (rs *Storage) Update(obj interface{}) (<-chan interface{}, error) {
|
||||
return nil, errors.New("unimplemented")
|
||||
}
|
||||
|
||||
// Delete satisfies the RESTStorage interface but is unimplemented
|
||||
// Delete satisfies the RESTStorage interface but is unimplemented.
|
||||
func (rs *Storage) Delete(id string) (<-chan interface{}, error) {
|
||||
return nil, errors.New("unimplemented")
|
||||
}
|
||||
|
||||
// New implements the RESTStorage interface
|
||||
// New implements the RESTStorage interface.
|
||||
func (rs Storage) New() interface{} {
|
||||
return &api.Endpoints{}
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
var ErrDoesNotExist = fmt.Errorf("The requested resource does not exist.")
|
||||
|
||||
// Keep track of a set of minions. Safe for concurrent reading/writing.
|
||||
// Registry keeps track of a set of minions. Safe for concurrent reading/writing.
|
||||
type Registry interface {
|
||||
List() (currentMinions []string, err error)
|
||||
Insert(minion string) error
|
||||
@@ -34,7 +34,7 @@ type Registry interface {
|
||||
Contains(minion string) (bool, error)
|
||||
}
|
||||
|
||||
// Initialize a minion registry with a list of minions.
|
||||
// NewRegistry initializes a minion registry with a list of minions.
|
||||
func NewRegistry(minions []string) Registry {
|
||||
m := &minionList{
|
||||
minions: util.StringSet{},
|
||||
|
@@ -34,7 +34,7 @@ import (
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// RegistryStorage implements the RESTStorage interface in terms of a PodRegistry
|
||||
// RegistryStorage implements the RESTStorage interface in terms of a PodRegistry.
|
||||
type RegistryStorage struct {
|
||||
cloudProvider cloudprovider.Interface
|
||||
mu sync.Mutex
|
||||
|
Reference in New Issue
Block a user