fake

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package fake implements testing fakes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeEtcdClient

type FakeEtcdClient struct {
	AlarmResponse        *clientv3.AlarmResponse
	EtcdEndpoints        []string
	MemberListResponse   *clientv3.MemberListResponse
	MemberRemoveResponse *clientv3.MemberRemoveResponse
	MemberUpdateResponse *clientv3.MemberUpdateResponse
	MoveLeaderResponse   *clientv3.MoveLeaderResponse
	StatusResponse       *clientv3.StatusResponse
	ErrorResponse        error
	MovedLeader          uint64
	RemovedMember        uint64
}

FakeEtcdClient represents a testing fake client for etcd interactions.

func (*FakeEtcdClient) AlarmList

AlarmList returns a list or alarms on etcd cluster.

func (*FakeEtcdClient) Close

func (c *FakeEtcdClient) Close() error

Close is closing fake client (no-op).

func (*FakeEtcdClient) Endpoints

func (c *FakeEtcdClient) Endpoints() []string

Endpoints returns available etcd endpoint.

func (*FakeEtcdClient) MemberList

MemberList returnl a list of etcd members for the cluster.

func (*FakeEtcdClient) MemberRemove

MemberRemove removes the member by id.

func (*FakeEtcdClient) MemberUpdate

MemberUpdate updates the member by id.

func (*FakeEtcdClient) MoveLeader

MoveLeader is moving etcd leader.

func (*FakeEtcdClient) Status

Status return a status response for the etcd member.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL