Documentation ¶
Overview ¶
Copyright 2020 Mirantis, Inc.
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(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) ListMembers(ctx context.Context) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEtcdReady ¶
CheckEtcdReady returns true if etcd responds to the metrics endpoint with a status code of 200
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