actionCache

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionJob

type ActionJob struct {
	// contains filtered or unexported fields
}

func (*ActionJob) String

func (aj *ActionJob) String() string

type ActionParams

type ActionParams map[string]string

func (ActionParams) Del

func (ap ActionParams) Del(key string)

func (ActionParams) Get

func (ap ActionParams) Get(key string) string

func (ActionParams) Has

func (ap ActionParams) Has(key string) bool

func (ActionParams) Set

func (ap ActionParams) Set(key, value string)

func (ActionParams) SetString

func (ap ActionParams) SetString(paramStr string, keys []string)

func (ActionParams) String

func (ap ActionParams) String() string

type ActionResult

type ActionResult struct {
	// contains filtered or unexported fields
}

type Actions

type Actions struct {
	// contains filtered or unexported fields
}

func NewActions

func NewActions(mediaType string, action []string) *Actions

func (*Actions) Action

func (*Actions) AddClient

func (a *Actions) AddClient(name string, client *ClientEntry)

func (*Actions) GetClient

func (a *Actions) GetClient(name string) (*ClientEntry, bool)

func (*Actions) GetParams

func (a *Actions) GetParams(action string) ([]string, error)

func (*Actions) RemoveClient

func (a *Actions) RemoveClient(name string)

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(actionTimeout time.Duration, db mediaserverdbproto.DBControllerClient, logger zLogger.ZLogger) *Cache

func (*Cache) AddActions

func (c *Cache) AddActions(mediaType string, actions []string)

func (*Cache) AddClientEntry

func (c *Cache) AddClientEntry(mediaType, action, address string, client *ClientEntry)

func (*Cache) GetActions

func (c *Cache) GetActions(mediaType, action string) (*Actions, bool)

func (*Cache) GetClientEntry

func (c *Cache) GetClientEntry(mediaType, action, address string) (*ClientEntry, bool)

func (*Cache) GetParams

func (c *Cache) GetParams(mediaType string, action string) ([]string, error)

func (*Cache) SetAction

func (c *Cache) SetAction(mediaType string, action string, actions *Actions)

type ClientEntry

type ClientEntry struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*ClientEntry) Close

func (c *ClientEntry) Close() error

func (*ClientEntry) RefreshTimeout

func (c *ClientEntry) RefreshTimeout(interval time.Duration)

func (*ClientEntry) SetTimeout

func (c *ClientEntry) SetTimeout(expiration time.Time)

func (*ClientEntry) Start

func (c *ClientEntry) Start(workers uint32, logger zLogger.ZLogger) error

Jump to

Keyboard shortcuts

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