Documentation ¶
Overview ¶
Copyright 2021 k0s authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CheckEtcdReady(ctx context.Context, certDir string, etcdCertDir string) error
- type Client
- func (c *Client) AddMember(ctx context.Context, name, peerAddress string) ([]string, error)
- func (c *Client) Close()
- func (c *Client) DeleteMember(ctx context.Context, peerID uint64) error
- func (c *Client) GetPeerIDByAddress(ctx context.Context, peerAddress string) (uint64, error)
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) ListMembers(ctx context.Context) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is our internal helper to access some of the etcd APIs
func (*Client) DeleteMember ¶
DeleteMember deletes member by peer name
func (*Client) GetPeerIDByAddress ¶
GetPeerIDByAddress looks up peer id by peer url
func (*Client) Health ¶ added in v0.12.0
Health return err if the etcd peer is not reported as healthy ref: https://github.com/etcd-io/etcd/blob/3ead91ca3edf66112d56c453169343515bba71c3/etcdctl/ctlv3/command/ep_command.go#L89