Documentation ¶
Index ¶
- Variables
- func GetBytes() []byte
- func PutBytes(buf []byte)
- type CastCenter
- type ClusterStatus
- type Handler
- type NetworkInfo
- type Option
- func SetCacheCleanupInterval(interval time.Duration) Option
- func SetCacheTimeout(timeout time.Duration) Option
- func SetChanSize(size int) Option
- func SetClusterHeartbeat(interval time.Duration) Option
- func SetClusterName(name string) Option
- func SetClusterTimeout(timeout time.Duration) Option
- func SetMulticastAddr(addr string) Option
- func SetRedis(redis Redis) Option
- func SetServicePort(port int) Option
- type Redis
- type UDPEvent
- type UDPServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrLocalIPNotFound local ip not found ErrLocalIPNotFound = fmt.Errorf("castcenter: local ip not found") )
Functions ¶
Types ¶
type CastCenter ¶
type CastCenter struct {
// contains filtered or unexported fields
}
CastCenter .
func (*CastCenter) GetClusterStatus ¶
func (c *CastCenter) GetClusterStatus() *ClusterStatus
GetClusterStatus .
func (*CastCenter) SetClusterStatus ¶
func (c *CastCenter) SetClusterStatus(cs *ClusterStatus)
SetClusterStatus .
type ClusterStatus ¶
ClusterStatus .
type NetworkInfo ¶
NetworkInfo .
type Option ¶
type Option func(*CastCenter) *CastCenter
Option .
func SetCacheCleanupInterval ¶
SetCacheCleanupInterval .
func SetClusterHeartbeat ¶
SetClusterHeartbeat .
type Redis ¶
type Redis interface { Get(key string) (string, error) SetNX(key string, value interface{}, expiration time.Duration) (bool, error) Expire(key string, expiration time.Duration) (bool, error) ZAdd(key, member string, score float64) (int64, error) ZRangeByScore(key string, min, max float64) ([]string, error) }
Redis .
type UDPServer ¶
type UDPServer struct {
// contains filtered or unexported fields
}
UDPServer .
func NewUDPServer ¶
NewUDPServer returns a new UDPServer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.