Documentation ¶
Index ¶
- Constants
- type CheckCallback
- type GuldanClient
- func (c *GuldanClient) CachedCount() int
- func (c *GuldanClient) Get(gid, token string, cached bool, gray bool) (string, error)
- func (c *GuldanClient) GetPublic(gid string, cached bool, gray bool) (string, error)
- func (c *GuldanClient) RawGet(gid, token string, cached bool, gray bool) (*Item, error)
- func (c *GuldanClient) SetAddress(address string)
- func (c *GuldanClient) SetItemExpireInterval(interval int32)
- func (c *GuldanClient) SetMissCache(interval int32)
- func (c *GuldanClient) SetPrinter(printer PrintCallback)
- func (c *GuldanClient) SetRole(role string)
- func (c *GuldanClient) Watch(gid, token string, gray bool, notify NotifyCallback, checker CheckCallback) error
- func (c *GuldanClient) WatchPublic(gid string, gray bool, notify NotifyCallback, checker CheckCallback) error
- type GuldanError
- type Item
- type MissItem
- type NotifyCallback
- type PrintCallback
Constants ¶
View Source
const ( GULDAN_CLIENT_VERSION = "0.1.5" GULDAN_CLIENT_ITEM_EXPIRE_INTERVAL int32 = 5 GULDAN_DEFAULT_ADDRESS = "http://localhost:7888" )
View Source
const ( ErrGuldanNotFound = GuldanError("not found") ErrGuldanForbidden = GuldanError("forbidden") ErrGuldanBadConfigFormat = GuldanError("bad config format") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckCallback ¶
type GuldanClient ¶
type GuldanClient struct {
// contains filtered or unexported fields
}
func GetInstance ¶
func GetInstance() *GuldanClient
func NewGuldanClient ¶
func NewGuldanClient() *GuldanClient
func (*GuldanClient) CachedCount ¶
func (c *GuldanClient) CachedCount() int
func (*GuldanClient) SetAddress ¶
func (c *GuldanClient) SetAddress(address string)
func (*GuldanClient) SetItemExpireInterval ¶
func (c *GuldanClient) SetItemExpireInterval(interval int32)
func (*GuldanClient) SetMissCache ¶
func (c *GuldanClient) SetMissCache(interval int32)
func (*GuldanClient) SetPrinter ¶
func (c *GuldanClient) SetPrinter(printer PrintCallback)
func (*GuldanClient) SetRole ¶
func (c *GuldanClient) SetRole(role string)
func (*GuldanClient) Watch ¶
func (c *GuldanClient) Watch(gid, token string, gray bool, notify NotifyCallback, checker CheckCallback) error
func (*GuldanClient) WatchPublic ¶
func (c *GuldanClient) WatchPublic(gid string, gray bool, notify NotifyCallback, checker CheckCallback) error
type GuldanError ¶
type GuldanError string
func (GuldanError) Error ¶
func (e GuldanError) Error() string
type Item ¶
type Item struct { ID string Group string Project string Name string Value string Token string Version string Gray bool Checker CheckCallback Notify NotifyCallback }
type MissItem ¶
func NewMissItem ¶
type NotifyCallback ¶
type PrintCallback ¶
type PrintCallback func(string)
Click to show internal directories.
Click to hide internal directories.