Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnitTestRunner only runs in `--short` mode, will fail otherwise. Attempts in cluster creation will result in tests being skipped. UnitTestRunner testRunner = unitRunner{} // E2eTestRunner runs etcd and etcdctl binaries in a separate process. E2eTestRunner = e2eRunner{} // IntegrationTestRunner runs etcdserver.EtcdServer in separate goroutine and uses client libraries to communicate. IntegrationTestRunner = integrationRunner{} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Put(context context.Context, key, value string, opts config.PutOptions) error Get(context context.Context, key string, opts config.GetOptions) (*clientv3.GetResponse, error) Delete(context context.Context, key string, opts config.DeleteOptions) (*clientv3.DeleteResponse, error) Compact(context context.Context, rev int64, opts config.CompactOption) (*clientv3.CompactResponse, error) Status(context context.Context) ([]*clientv3.StatusResponse, error) HashKV(context context.Context, rev int64) ([]*clientv3.HashKVResponse, error) Health(context context.Context) error Defragment(context context.Context, opts config.DefragOption) error AlarmList(context context.Context) (*clientv3.AlarmResponse, error) AlarmDisarm(context context.Context, alarmMember *clientv3.AlarmMember) (*clientv3.AlarmResponse, error) Grant(context context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error) TimeToLive(context context.Context, id clientv3.LeaseID, opts config.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error) Leases(context context.Context) (*clientv3.LeaseLeasesResponse, error) KeepAliveOnce(context context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error) Revoke(context context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error) AuthEnable(context context.Context) (*clientv3.AuthEnableResponse, error) AuthDisable(context context.Context) (*clientv3.AuthDisableResponse, error) AuthStatus(context context.Context) (*clientv3.AuthStatusResponse, error) UserAdd(context context.Context, name, password string, opts config.UserAddOptions) (*clientv3.AuthUserAddResponse, error) UserGet(context context.Context, name string) (*clientv3.AuthUserGetResponse, error) UserList(context context.Context) (*clientv3.AuthUserListResponse, error) UserDelete(context context.Context, name string) (*clientv3.AuthUserDeleteResponse, error) UserChangePass(context context.Context, user, newPass string) error UserGrantRole(context context.Context, user string, role string) (*clientv3.AuthUserGrantRoleResponse, error) UserRevokeRole(context context.Context, user string, role string) (*clientv3.AuthUserRevokeRoleResponse, error) RoleAdd(context context.Context, name string) (*clientv3.AuthRoleAddResponse, error) RoleGrantPermission(context context.Context, name string, key, rangeEnd string, permType clientv3.PermissionType) (*clientv3.AuthRoleGrantPermissionResponse, error) RoleGet(context context.Context, role string) (*clientv3.AuthRoleGetResponse, error) RoleList(context context.Context) (*clientv3.AuthRoleListResponse, error) RoleRevokePermission(context context.Context, role string, key, rangeEnd string) (*clientv3.AuthRoleRevokePermissionResponse, error) RoleDelete(context context.Context, role string) (*clientv3.AuthRoleDeleteResponse, error) Txn(context context.Context, compares, ifSucess, ifFail []string, o config.TxnOptions) (*clientv3.TxnResponse, error) MemberList(context context.Context) (*clientv3.MemberListResponse, error) MemberAdd(context context.Context, name string, peerAddrs []string) (*clientv3.MemberAddResponse, error) MemberAddAsLearner(context context.Context, name string, peerAddrs []string) (*clientv3.MemberAddResponse, error) MemberRemove(ctx context.Context, id uint64) (*clientv3.MemberRemoveResponse, error) Watch(ctx context.Context, key string, opts config.WatchOptions) clientv3.WatchChan }
func MustClient ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.