leaf

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SESSION_MAX_AGE = 30 * time.Second
	SESSION_GC_RATE = 15 * time.Second
	SESSION_Q_LEN   = 100
)

Variables

This section is empty.

Functions

func DeleteRole added in v0.12.0

func DeleteRole(id string, skipSession *Session)

delete the role on all leaf nodes

func DeleteSpace

func DeleteSpace(id string, skipSession *Session)

delete the space on all leaf nodes

func DeleteTemplate

func DeleteTemplate(templateId string, skipSession *Session)

delete the template on all leaf nodes

func DeleteTemplateVar

func DeleteTemplateVar(id string, skipSession *Session)

delete the template var on all leaf nodes

func DeleteToken

func DeleteToken(id string, skipSession *Session)

delete the space on all leaf nodes

func DeleteUser

func DeleteUser(id string, skipSession *Session)

delete the user on all leaf nodes

func Destroy added in v0.17.0

func Destroy(id string)

func Gc added in v0.17.0

func Gc()

func UpdateRole added in v0.12.0

func UpdateRole(role *model.Role, skipSession *Session)

update the role on all leaf nodes

func UpdateSpace

func UpdateSpace(space *model.Space, updateFields []string, skipSession *Session)

update the space on all leaf nodes

func UpdateTemplate

func UpdateTemplate(template *model.Template, updateFields []string, skipSession *Session)

update the template on all leaf nodes

func UpdateTemplateVar

func UpdateTemplateVar(templateVar *model.TemplateVar, skipSession *Session)

update the template var on all leaf nodes

func UpdateUser

func UpdateUser(user *model.User, updateFields []string, skipSession *Session)

update the user on all leaf nodes

Types

type Session

type Session struct {
	Id string
	// contains filtered or unexported fields
}

func Register

func Register(id string, ws *websocket.Conn, location string, token *model.Token) *Session

func (*Session) Bootstrap

func (s *Session) Bootstrap()

func (*Session) DeleteRole added in v0.12.0

func (s *Session) DeleteRole(id string)

delete the role on a leaf node

func (*Session) DeleteSpace

func (s *Session) DeleteSpace(id string)

delete the space on a leaf node

func (*Session) DeleteTemplate

func (s *Session) DeleteTemplate(templateId string)

delete the template on a leaf node

func (*Session) DeleteTemplateVar

func (s *Session) DeleteTemplateVar(id string)

delete the template var on a leaf node

func (*Session) DeleteToken

func (s *Session) DeleteToken(id string)

delete the space on a leaf node

func (*Session) DeleteUser

func (s *Session) DeleteUser(id string)

delete the user on a leaf node

func (*Session) Destroy added in v0.17.0

func (s *Session) Destroy()

func (*Session) GetLocation added in v0.17.0

func (s *Session) GetLocation() string

func (*Session) KeepAlive added in v0.17.0

func (s *Session) KeepAlive()

func (*Session) UpdateRole added in v0.12.0

func (s *Session) UpdateRole(role *model.Role)

func (*Session) UpdateSpace

func (s *Session) UpdateSpace(space *model.Space, updateFields []string) bool

update the space on a leaf node

func (*Session) UpdateTemplate

func (s *Session) UpdateTemplate(template *model.Template, updateFields []string)

update the template on a leaf node

func (*Session) UpdateTemplateVar

func (s *Session) UpdateTemplateVar(templateVar *model.TemplateVar) bool

update the template var on a leaf node

func (*Session) UpdateUser

func (s *Session) UpdateUser(user *model.User, updateFields []string)

update the user on a leaf node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL