Documentation ¶
Index ¶
- Variables
- func AddEtcdHook(hook GobaseEtcdHook)
- type EtcdClientWrap
- func (etcdWrap *EtcdClientWrap) ActiveConnection() *grpc.ClientConn
- func (etcdWrap *EtcdClientWrap) AddHook(etcdHook GobaseEtcdHook)
- func (etcdWrap *EtcdClientWrap) AlarmDisarm(ctx context.Context, m *etcdClientV3.AlarmMember) (*etcdClientV3.AlarmResponse, error)
- func (etcdWrap *EtcdClientWrap) AlarmList(ctx context.Context) (*etcdClientV3.AlarmResponse, error)
- func (etcdWrap *EtcdClientWrap) AuthDisable(ctx context.Context) (*etcdClientV3.AuthDisableResponse, error)
- func (etcdWrap *EtcdClientWrap) AuthEnable(ctx context.Context) (*etcdClientV3.AuthEnableResponse, error)
- func (etcdWrap *EtcdClientWrap) AuthStatus(ctx context.Context) (*etcdClientV3.AuthStatusResponse, error)
- func (etcdWrap *EtcdClientWrap) Authenticate(ctx context.Context, name string, password string) (*etcdClientV3.AuthenticateResponse, error)
- func (etcdWrap *EtcdClientWrap) Close() error
- func (etcdWrap *EtcdClientWrap) Compact(ctx context.Context, rev int64, opts ...etcdClientV3.CompactOption) (*etcdClientV3.CompactResponse, error)
- func (etcdWrap *EtcdClientWrap) Ctx() context.Context
- func (etcdWrap *EtcdClientWrap) Defragment(ctx context.Context, endpoint string) (*etcdClientV3.DefragmentResponse, error)
- func (etcdWrap *EtcdClientWrap) Delete(ctx context.Context, key string, opts ...etcdClientV3.OpOption) (*etcdClientV3.DeleteResponse, error)
- func (etcdWrap *EtcdClientWrap) Dial(ep string) (*grpc.ClientConn, error)
- func (etcdWrap *EtcdClientWrap) Do(ctx context.Context, op etcdClientV3.Op) (etcdClientV3.OpResponse, error)
- func (etcdWrap *EtcdClientWrap) Endpoints() []string
- func (etcdWrap *EtcdClientWrap) Get(ctx context.Context, key string, opts ...etcdClientV3.OpOption) (*etcdClientV3.GetResponse, error)
- func (etcdWrap *EtcdClientWrap) GetLogger() *zap.Logger
- func (etcdWrap *EtcdClientWrap) Grant(ctx context.Context, ttl int64) (*etcdClientV3.LeaseGrantResponse, error)
- func (etcdWrap *EtcdClientWrap) HashKV(ctx context.Context, endpoint string, rev int64) (*etcdClientV3.HashKVResponse, error)
- func (etcdWrap *EtcdClientWrap) KeepAlive(ctx context.Context, id etcdClientV3.LeaseID) (<-chan *etcdClientV3.LeaseKeepAliveResponse, error)
- func (etcdWrap *EtcdClientWrap) KeepAliveOnce(ctx context.Context, id etcdClientV3.LeaseID) (*etcdClientV3.LeaseKeepAliveResponse, error)
- func (etcdWrap *EtcdClientWrap) Leases(ctx context.Context) (*etcdClientV3.LeaseLeasesResponse, error)
- func (etcdWrap *EtcdClientWrap) MemberAdd(ctx context.Context, peerAddrs []string) (*etcdClientV3.MemberAddResponse, error)
- func (etcdWrap *EtcdClientWrap) MemberAddAsLearner(ctx context.Context, peerAddrs []string) (*etcdClientV3.MemberAddResponse, error)
- func (etcdWrap *EtcdClientWrap) MemberList(ctx context.Context) (*etcdClientV3.MemberListResponse, error)
- func (etcdWrap *EtcdClientWrap) MemberPromote(ctx context.Context, id uint64) (*etcdClientV3.MemberPromoteResponse, error)
- func (etcdWrap *EtcdClientWrap) MemberRemove(ctx context.Context, id uint64) (*etcdClientV3.MemberRemoveResponse, error)
- func (etcdWrap *EtcdClientWrap) MoveLeader(ctx context.Context, transfereeID uint64) (*etcdClientV3.MoveLeaderResponse, error)
- func (etcdWrap *EtcdClientWrap) Put(ctx context.Context, key, val string, opts ...etcdClientV3.OpOption) (*etcdClientV3.PutResponse, error)
- func (etcdWrap *EtcdClientWrap) RequestProgress(ctx context.Context) error
- func (etcdWrap *EtcdClientWrap) Revoke(ctx context.Context, id etcdClientV3.LeaseID) (*etcdClientV3.LeaseRevokeResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleAdd(ctx context.Context, name string) (*etcdClientV3.AuthRoleAddResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleDelete(ctx context.Context, role string) (*etcdClientV3.AuthRoleDeleteResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleGet(ctx context.Context, role string) (*etcdClientV3.AuthRoleGetResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, ...) (*etcdClientV3.AuthRoleGrantPermissionResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleList(ctx context.Context) (*etcdClientV3.AuthRoleListResponse, error)
- func (etcdWrap *EtcdClientWrap) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*etcdClientV3.AuthRoleRevokePermissionResponse, error)
- func (etcdWrap *EtcdClientWrap) SetEndpoints(eps ...string)
- func (etcdWrap *EtcdClientWrap) Snapshot(ctx context.Context) (io.ReadCloser, error)
- func (etcdWrap *EtcdClientWrap) Status(ctx context.Context, endpoint string) (*etcdClientV3.StatusResponse, error)
- func (etcdWrap *EtcdClientWrap) Sync(ctx context.Context) error
- func (etcdWrap *EtcdClientWrap) TimeToLive(ctx context.Context, id etcdClientV3.LeaseID, opts ...etcdClientV3.LeaseOption) (*etcdClientV3.LeaseTimeToLiveResponse, error)
- func (etcdWrap *EtcdClientWrap) Txn(ctx context.Context) etcdClientV3.Txn
- func (etcdWrap *EtcdClientWrap) UserAdd(ctx context.Context, name string, password string) (*etcdClientV3.AuthUserAddResponse, error)
- func (etcdWrap *EtcdClientWrap) UserAddWithOptions(ctx context.Context, name string, password string, ...) (*etcdClientV3.AuthUserAddResponse, error)
- func (etcdWrap *EtcdClientWrap) UserChangePassword(ctx context.Context, name string, password string) (*etcdClientV3.AuthUserChangePasswordResponse, error)
- func (etcdWrap *EtcdClientWrap) UserDelete(ctx context.Context, name string) (*etcdClientV3.AuthUserDeleteResponse, error)
- func (etcdWrap *EtcdClientWrap) UserGet(ctx context.Context, name string) (*etcdClientV3.AuthUserGetResponse, error)
- func (etcdWrap *EtcdClientWrap) UserGrantRole(ctx context.Context, user string, role string) (*etcdClientV3.AuthUserGrantRoleResponse, error)
- func (etcdWrap *EtcdClientWrap) UserList(ctx context.Context) (*etcdClientV3.AuthUserListResponse, error)
- func (etcdWrap *EtcdClientWrap) UserRevokeRole(ctx context.Context, name string, role string) (*etcdClientV3.AuthUserRevokeRoleResponse, error)
- func (etcdWrap *EtcdClientWrap) Watch(ctx context.Context, key string, opts ...etcdClientV3.OpOption) etcdClientV3.WatchChan
- func (etcdWrap *EtcdClientWrap) WithLogger(lg *zap.Logger) *etcdClientV3.Client
- type EtcdLogger
- func (g *EtcdLogger) Error(args ...interface{})
- func (g *EtcdLogger) ErrorDepth(depth int, args ...interface{})
- func (g *EtcdLogger) Errorf(format string, args ...interface{})
- func (g *EtcdLogger) Errorln(args ...interface{})
- func (g *EtcdLogger) Fatal(args ...interface{})
- func (g *EtcdLogger) FatalDepth(depth int, args ...interface{})
- func (g *EtcdLogger) Fatalf(format string, args ...interface{})
- func (g *EtcdLogger) Fatalln(args ...interface{})
- func (g *EtcdLogger) Info(args ...interface{})
- func (g *EtcdLogger) InfoDepth(depth int, args ...interface{})
- func (g *EtcdLogger) Infof(format string, args ...interface{})
- func (g *EtcdLogger) Infoln(args ...interface{})
- func (g *EtcdLogger) V(l int) bool
- func (g *EtcdLogger) Warning(args ...interface{})
- func (g *EtcdLogger) WarningDepth(depth int, args ...interface{})
- func (g *EtcdLogger) Warningf(format string, args ...interface{})
- func (g *EtcdLogger) Warningln(args ...interface{})
- type GobaseEtcdHook
Constants ¶
This section is empty.
Variables ¶
View Source
var EtcdHooks []GobaseEtcdHook
Functions ¶
func AddEtcdHook ¶
func AddEtcdHook(hook GobaseEtcdHook)
Types ¶
type EtcdClientWrap ¶
type EtcdClientWrap struct { *etcdClientV3.Client // contains filtered or unexported fields }
func NewEtcdClient ¶
func NewEtcdClient() (*EtcdClientWrap, error)
func NewEtcdClientWithCfg ¶
func NewEtcdClientWithCfg(etcdCfg etcdClientV3.Config) (*EtcdClientWrap, error)
func (*EtcdClientWrap) ActiveConnection ¶
func (etcdWrap *EtcdClientWrap) ActiveConnection() *grpc.ClientConn
func (*EtcdClientWrap) AddHook ¶
func (etcdWrap *EtcdClientWrap) AddHook(etcdHook GobaseEtcdHook)
func (*EtcdClientWrap) AlarmDisarm ¶
func (etcdWrap *EtcdClientWrap) AlarmDisarm(ctx context.Context, m *etcdClientV3.AlarmMember) (*etcdClientV3.AlarmResponse, error)
func (*EtcdClientWrap) AlarmList ¶
func (etcdWrap *EtcdClientWrap) AlarmList(ctx context.Context) (*etcdClientV3.AlarmResponse, error)
func (*EtcdClientWrap) AuthDisable ¶
func (etcdWrap *EtcdClientWrap) AuthDisable(ctx context.Context) (*etcdClientV3.AuthDisableResponse, error)
func (*EtcdClientWrap) AuthEnable ¶
func (etcdWrap *EtcdClientWrap) AuthEnable(ctx context.Context) (*etcdClientV3.AuthEnableResponse, error)
func (*EtcdClientWrap) AuthStatus ¶
func (etcdWrap *EtcdClientWrap) AuthStatus(ctx context.Context) (*etcdClientV3.AuthStatusResponse, error)
func (*EtcdClientWrap) Authenticate ¶
func (etcdWrap *EtcdClientWrap) Authenticate(ctx context.Context, name string, password string) (*etcdClientV3.AuthenticateResponse, error)
func (*EtcdClientWrap) Close ¶
func (etcdWrap *EtcdClientWrap) Close() error
func (*EtcdClientWrap) Compact ¶
func (etcdWrap *EtcdClientWrap) Compact(ctx context.Context, rev int64, opts ...etcdClientV3.CompactOption) (*etcdClientV3.CompactResponse, error)
func (*EtcdClientWrap) Ctx ¶
func (etcdWrap *EtcdClientWrap) Ctx() context.Context
func (*EtcdClientWrap) Defragment ¶
func (etcdWrap *EtcdClientWrap) Defragment(ctx context.Context, endpoint string) (*etcdClientV3.DefragmentResponse, error)
func (*EtcdClientWrap) Delete ¶
func (etcdWrap *EtcdClientWrap) Delete(ctx context.Context, key string, opts ...etcdClientV3.OpOption) (*etcdClientV3.DeleteResponse, error)
func (*EtcdClientWrap) Dial ¶
func (etcdWrap *EtcdClientWrap) Dial(ep string) (*grpc.ClientConn, error)
func (*EtcdClientWrap) Do ¶
func (etcdWrap *EtcdClientWrap) Do(ctx context.Context, op etcdClientV3.Op) (etcdClientV3.OpResponse, error)
func (*EtcdClientWrap) Endpoints ¶
func (etcdWrap *EtcdClientWrap) Endpoints() []string
func (*EtcdClientWrap) Get ¶
func (etcdWrap *EtcdClientWrap) Get(ctx context.Context, key string, opts ...etcdClientV3.OpOption) (*etcdClientV3.GetResponse, error)
func (*EtcdClientWrap) GetLogger ¶
func (etcdWrap *EtcdClientWrap) GetLogger() *zap.Logger
func (*EtcdClientWrap) Grant ¶
func (etcdWrap *EtcdClientWrap) Grant(ctx context.Context, ttl int64) (*etcdClientV3.LeaseGrantResponse, error)
func (*EtcdClientWrap) HashKV ¶
func (etcdWrap *EtcdClientWrap) HashKV(ctx context.Context, endpoint string, rev int64) (*etcdClientV3.HashKVResponse, error)
func (*EtcdClientWrap) KeepAlive ¶
func (etcdWrap *EtcdClientWrap) KeepAlive(ctx context.Context, id etcdClientV3.LeaseID) (<-chan *etcdClientV3.LeaseKeepAliveResponse, error)
func (*EtcdClientWrap) KeepAliveOnce ¶
func (etcdWrap *EtcdClientWrap) KeepAliveOnce(ctx context.Context, id etcdClientV3.LeaseID) (*etcdClientV3.LeaseKeepAliveResponse, error)
func (*EtcdClientWrap) Leases ¶
func (etcdWrap *EtcdClientWrap) Leases(ctx context.Context) (*etcdClientV3.LeaseLeasesResponse, error)
func (*EtcdClientWrap) MemberAdd ¶
func (etcdWrap *EtcdClientWrap) MemberAdd(ctx context.Context, peerAddrs []string) (*etcdClientV3.MemberAddResponse, error)
func (*EtcdClientWrap) MemberAddAsLearner ¶
func (etcdWrap *EtcdClientWrap) MemberAddAsLearner(ctx context.Context, peerAddrs []string) (*etcdClientV3.MemberAddResponse, error)
func (*EtcdClientWrap) MemberList ¶
func (etcdWrap *EtcdClientWrap) MemberList(ctx context.Context) (*etcdClientV3.MemberListResponse, error)
func (*EtcdClientWrap) MemberPromote ¶
func (etcdWrap *EtcdClientWrap) MemberPromote(ctx context.Context, id uint64) (*etcdClientV3.MemberPromoteResponse, error)
func (*EtcdClientWrap) MemberRemove ¶
func (etcdWrap *EtcdClientWrap) MemberRemove(ctx context.Context, id uint64) (*etcdClientV3.MemberRemoveResponse, error)
func (*EtcdClientWrap) MoveLeader ¶
func (etcdWrap *EtcdClientWrap) MoveLeader(ctx context.Context, transfereeID uint64) (*etcdClientV3.MoveLeaderResponse, error)
func (*EtcdClientWrap) Put ¶
func (etcdWrap *EtcdClientWrap) Put(ctx context.Context, key, val string, opts ...etcdClientV3.OpOption) (*etcdClientV3.PutResponse, error)
func (*EtcdClientWrap) RequestProgress ¶
func (etcdWrap *EtcdClientWrap) RequestProgress(ctx context.Context) error
func (*EtcdClientWrap) Revoke ¶
func (etcdWrap *EtcdClientWrap) Revoke(ctx context.Context, id etcdClientV3.LeaseID) (*etcdClientV3.LeaseRevokeResponse, error)
func (*EtcdClientWrap) RoleAdd ¶
func (etcdWrap *EtcdClientWrap) RoleAdd(ctx context.Context, name string) (*etcdClientV3.AuthRoleAddResponse, error)
func (*EtcdClientWrap) RoleDelete ¶
func (etcdWrap *EtcdClientWrap) RoleDelete(ctx context.Context, role string) (*etcdClientV3.AuthRoleDeleteResponse, error)
func (*EtcdClientWrap) RoleGet ¶
func (etcdWrap *EtcdClientWrap) RoleGet(ctx context.Context, role string) (*etcdClientV3.AuthRoleGetResponse, error)
func (*EtcdClientWrap) RoleGrantPermission ¶
func (etcdWrap *EtcdClientWrap) RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, permType etcdClientV3.PermissionType) (*etcdClientV3.AuthRoleGrantPermissionResponse, error)
func (*EtcdClientWrap) RoleList ¶
func (etcdWrap *EtcdClientWrap) RoleList(ctx context.Context) (*etcdClientV3.AuthRoleListResponse, error)
func (*EtcdClientWrap) RoleRevokePermission ¶
func (etcdWrap *EtcdClientWrap) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*etcdClientV3.AuthRoleRevokePermissionResponse, error)
func (*EtcdClientWrap) SetEndpoints ¶
func (etcdWrap *EtcdClientWrap) SetEndpoints(eps ...string)
func (*EtcdClientWrap) Snapshot ¶
func (etcdWrap *EtcdClientWrap) Snapshot(ctx context.Context) (io.ReadCloser, error)
func (*EtcdClientWrap) Status ¶
func (etcdWrap *EtcdClientWrap) Status(ctx context.Context, endpoint string) (*etcdClientV3.StatusResponse, error)
func (*EtcdClientWrap) TimeToLive ¶
func (etcdWrap *EtcdClientWrap) TimeToLive(ctx context.Context, id etcdClientV3.LeaseID, opts ...etcdClientV3.LeaseOption) (*etcdClientV3.LeaseTimeToLiveResponse, error)
func (*EtcdClientWrap) Txn ¶
func (etcdWrap *EtcdClientWrap) Txn(ctx context.Context) etcdClientV3.Txn
func (*EtcdClientWrap) UserAdd ¶
func (etcdWrap *EtcdClientWrap) UserAdd(ctx context.Context, name string, password string) (*etcdClientV3.AuthUserAddResponse, error)
func (*EtcdClientWrap) UserAddWithOptions ¶
func (etcdWrap *EtcdClientWrap) UserAddWithOptions(ctx context.Context, name string, password string, opt *etcdClientV3.UserAddOptions) (*etcdClientV3.AuthUserAddResponse, error)
func (*EtcdClientWrap) UserChangePassword ¶
func (etcdWrap *EtcdClientWrap) UserChangePassword(ctx context.Context, name string, password string) (*etcdClientV3.AuthUserChangePasswordResponse, error)
func (*EtcdClientWrap) UserDelete ¶
func (etcdWrap *EtcdClientWrap) UserDelete(ctx context.Context, name string) (*etcdClientV3.AuthUserDeleteResponse, error)
func (*EtcdClientWrap) UserGet ¶
func (etcdWrap *EtcdClientWrap) UserGet(ctx context.Context, name string) (*etcdClientV3.AuthUserGetResponse, error)
func (*EtcdClientWrap) UserGrantRole ¶
func (etcdWrap *EtcdClientWrap) UserGrantRole(ctx context.Context, user string, role string) (*etcdClientV3.AuthUserGrantRoleResponse, error)
func (*EtcdClientWrap) UserList ¶
func (etcdWrap *EtcdClientWrap) UserList(ctx context.Context) (*etcdClientV3.AuthUserListResponse, error)
func (*EtcdClientWrap) UserRevokeRole ¶
func (etcdWrap *EtcdClientWrap) UserRevokeRole(ctx context.Context, name string, role string) (*etcdClientV3.AuthUserRevokeRoleResponse, error)
func (*EtcdClientWrap) Watch ¶
func (etcdWrap *EtcdClientWrap) Watch(ctx context.Context, key string, opts ...etcdClientV3.OpOption) etcdClientV3.WatchChan
func (*EtcdClientWrap) WithLogger ¶
func (etcdWrap *EtcdClientWrap) WithLogger(lg *zap.Logger) *etcdClientV3.Client
type EtcdLogger ¶
type EtcdLogger struct{}
func (*EtcdLogger) Error ¶
func (g *EtcdLogger) Error(args ...interface{})
func (*EtcdLogger) ErrorDepth ¶
func (g *EtcdLogger) ErrorDepth(depth int, args ...interface{})
func (*EtcdLogger) Errorf ¶
func (g *EtcdLogger) Errorf(format string, args ...interface{})
func (*EtcdLogger) Errorln ¶
func (g *EtcdLogger) Errorln(args ...interface{})
func (*EtcdLogger) Fatal ¶
func (g *EtcdLogger) Fatal(args ...interface{})
func (*EtcdLogger) FatalDepth ¶
func (g *EtcdLogger) FatalDepth(depth int, args ...interface{})
func (*EtcdLogger) Fatalf ¶
func (g *EtcdLogger) Fatalf(format string, args ...interface{})
func (*EtcdLogger) Fatalln ¶
func (g *EtcdLogger) Fatalln(args ...interface{})
func (*EtcdLogger) Info ¶
func (g *EtcdLogger) Info(args ...interface{})
func (*EtcdLogger) InfoDepth ¶
func (g *EtcdLogger) InfoDepth(depth int, args ...interface{})
func (*EtcdLogger) Infof ¶
func (g *EtcdLogger) Infof(format string, args ...interface{})
func (*EtcdLogger) Infoln ¶
func (g *EtcdLogger) Infoln(args ...interface{})
func (*EtcdLogger) V ¶
func (g *EtcdLogger) V(l int) bool
func (*EtcdLogger) Warning ¶
func (g *EtcdLogger) Warning(args ...interface{})
func (*EtcdLogger) WarningDepth ¶
func (g *EtcdLogger) WarningDepth(depth int, args ...interface{})
func (*EtcdLogger) Warningf ¶
func (g *EtcdLogger) Warningf(format string, args ...interface{})
func (*EtcdLogger) Warningln ¶
func (g *EtcdLogger) Warningln(args ...interface{})
type GobaseEtcdHook ¶
Click to show internal directories.
Click to hide internal directories.