Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(srv gfs.ServerAddress, rpcname string, args interface{}, reply interface{}) error
Call is RPC call helper
Types ¶
type ArraySet ¶
type ArraySet struct {
// contains filtered or unexported fields
}
ArraySet is a set implemented using array. I suppose it'll provide better performance than golang builtin map when the set is really really small. It is thread-safe since a mutex is used.
func (*ArraySet) Delete ¶
func (s *ArraySet) Delete(element interface{})
Delete delete an element in the set.
func (*ArraySet) GetAll ¶
func (s *ArraySet) GetAll() []interface{}
GetAll returns all elements of the set.
func (*ArraySet) GetAllAndClear ¶
func (s *ArraySet) GetAllAndClear() []interface{}
GetAllAndClear returns all elements of the set.
func (*ArraySet) RandomPick ¶
func (s *ArraySet) RandomPick() interface{}
RandomPick picks a random element from the set.
Click to show internal directories.
Click to hide internal directories.