Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGroup(g *groupcache.Group)
- func RegisterPendingGroup(f GroupFunc) error
- type GroupFunc
- type GroupGetterFunc
- type SecuredHeaderTransport
- type SharedGCache
- func (c *SharedGCache) FetchPeers() ([]string, error)
- func (c *SharedGCache) GetAllGroups() ([]*groupcache.Group, error)
- func (c *SharedGCache) GetGroupByName(groupName string) (*groupcache.Group, error)
- func (c *SharedGCache) GetPool() *groupcache.HTTPPool
- func (c *SharedGCache) GroupCacheHandler(ctx *gin.Context)
- func (c *SharedGCache) Shutdown() error
- func (c *SharedGCache) StartRunPrep() error
Constants ¶
View Source
const ( GroupELTeam = "EL-Team" GroupELParticipants = "EL-Participants" GroupELParticipantForTeam = "EL-Participants-For-Team" )
View Source
const ( InsecureToken = "INSECURE" TokenKey = "Authorization" )
Variables ¶
View Source
var ( ErrPendingGroupsCreated = errors.New("pending groups already created") ErrPendingGroupsNotCreated = errors.New("pending groups not created yet") ErrNoSuchGroup = errors.New("requested group doesn't exist") )
View Source
var (
ErrBadStatusCode = errors.New("bad status code returned")
)
Functions ¶
func RegisterGroup ¶
func RegisterGroup(g *groupcache.Group)
func RegisterPendingGroup ¶
Types ¶
type GroupFunc ¶
type GroupFunc func(log *logrus.Entry, sgc *SharedGCache) *groupcache.Group
type GroupGetterFunc ¶
type SecuredHeaderTransport ¶
type SecuredHeaderTransport struct { http.RoundTripper Token string Ctx context.Context }
type SharedGCache ¶
type SharedGCache struct {
// contains filtered or unexported fields
}
func GlobalCache ¶
func GlobalCache() *SharedGCache
GlobalCache fetches the main, global, shared gcache
func NewGlobalSharedGCache ¶
func NewGlobalSharedGCache(log *logrus.Entry, rClient *redis.Client) (*SharedGCache, error)
func NewSharedGCache ¶
func NewSharedGCache(log *logrus.Entry, rClient *redis.Client) (*SharedGCache, error)
func (*SharedGCache) FetchPeers ¶
func (c *SharedGCache) FetchPeers() ([]string, error)
func (*SharedGCache) GetAllGroups ¶
func (c *SharedGCache) GetAllGroups() ([]*groupcache.Group, error)
GetAllGroups returns a list of all groupcache groups
func (*SharedGCache) GetGroupByName ¶
func (c *SharedGCache) GetGroupByName(groupName string) (*groupcache.Group, error)
func (*SharedGCache) GetPool ¶
func (c *SharedGCache) GetPool() *groupcache.HTTPPool
GetPool returns pool to register to "/_groupcache/" web handler
func (*SharedGCache) GroupCacheHandler ¶
func (c *SharedGCache) GroupCacheHandler(ctx *gin.Context)
GroupCacheHandler register via gin to "/_groupcache/"
func (*SharedGCache) StartRunPrep ¶
func (c *SharedGCache) StartRunPrep() error
StartRunPrep handles the startup prep
Click to show internal directories.
Click to hide internal directories.