cachestorage

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	CacheId        CacheId `json:"cacheId"`        // An opaque unique id of the cache.
	SecurityOrigin string  `json:"securityOrigin"` // Security origin of the cache.
	CacheName      string  `json:"cacheName"`      // The name of the cache.
}

type CacheId

type CacheId string

type CacheStorageAgent

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

func NewAgent

func NewAgent(conn *shared.Connection) *CacheStorageAgent

func (*CacheStorageAgent) Name

func (agent *CacheStorageAgent) Name() string

func (*CacheStorageAgent) ProcessCommand

func (agent *CacheStorageAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*CacheStorageAgent) SetDeleteCacheHandler

func (agent *CacheStorageAgent) SetDeleteCacheHandler(handler func(DeleteCacheCommand))

func (*CacheStorageAgent) SetDeleteEntryHandler

func (agent *CacheStorageAgent) SetDeleteEntryHandler(handler func(DeleteEntryCommand))

func (*CacheStorageAgent) SetRequestCacheNamesHandler

func (agent *CacheStorageAgent) SetRequestCacheNamesHandler(handler func(RequestCacheNamesCommand))

Commands Sent From Frontend

func (*CacheStorageAgent) SetRequestEntriesHandler

func (agent *CacheStorageAgent) SetRequestEntriesHandler(handler func(RequestEntriesCommand))

type DataEntry

type DataEntry struct {
	Request  string `json:"request"`  // Request url spec.
	Response string `json:"response"` // Response stataus text.
}

type DeleteCacheCommand

type DeleteCacheCommand struct {
	DestinationTargetID string

	CacheId CacheId `json:"cacheId"` // Id of cache for deletion.
	// contains filtered or unexported fields
}

func (*DeleteCacheCommand) Initalize

func (c *DeleteCacheCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DeleteCacheCommand) Respond

func (c *DeleteCacheCommand) Respond()

func (*DeleteCacheCommand) RespondWithError

func (c *DeleteCacheCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DeleteCacheCommandFn

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

func (*DeleteCacheCommandFn) Load

func (a *DeleteCacheCommandFn) Load() func(DeleteCacheCommand)

func (*DeleteCacheCommandFn) Store

func (a *DeleteCacheCommandFn) Store(fn func(DeleteCacheCommand))

type DeleteCacheReturn

type DeleteCacheReturn struct {
}

type DeleteEntryCommand

type DeleteEntryCommand struct {
	DestinationTargetID string

	CacheId CacheId `json:"cacheId"` // Id of cache where the entry will be deleted.
	Request string  `json:"request"` // URL spec of the request.
	// contains filtered or unexported fields
}

func (*DeleteEntryCommand) Initalize

func (c *DeleteEntryCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DeleteEntryCommand) Respond

func (c *DeleteEntryCommand) Respond()

func (*DeleteEntryCommand) RespondWithError

func (c *DeleteEntryCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DeleteEntryCommandFn

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

func (*DeleteEntryCommandFn) Load

func (a *DeleteEntryCommandFn) Load() func(DeleteEntryCommand)

func (*DeleteEntryCommandFn) Store

func (a *DeleteEntryCommandFn) Store(fn func(DeleteEntryCommand))

type DeleteEntryReturn

type DeleteEntryReturn struct {
}

type RequestCacheNamesCommand

type RequestCacheNamesCommand struct {
	DestinationTargetID string

	SecurityOrigin string `json:"securityOrigin"` // Security origin.
	// contains filtered or unexported fields
}

func (*RequestCacheNamesCommand) Initalize

func (c *RequestCacheNamesCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*RequestCacheNamesCommand) Respond

func (*RequestCacheNamesCommand) RespondWithError

func (c *RequestCacheNamesCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type RequestCacheNamesCommandFn

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

func (*RequestCacheNamesCommandFn) Load

func (*RequestCacheNamesCommandFn) Store

type RequestCacheNamesReturn

type RequestCacheNamesReturn struct {
	Caches []Cache `json:"caches"` // Caches for the security origin.
}

type RequestEntriesCommand

type RequestEntriesCommand struct {
	DestinationTargetID string

	CacheId   CacheId `json:"cacheId"`   // ID of cache to get entries from.
	SkipCount int64   `json:"skipCount"` // Number of records to skip.
	PageSize  int64   `json:"pageSize"`  // Number of records to fetch.
	// contains filtered or unexported fields
}

func (*RequestEntriesCommand) Initalize

func (c *RequestEntriesCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*RequestEntriesCommand) Respond

func (*RequestEntriesCommand) RespondWithError

func (c *RequestEntriesCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type RequestEntriesCommandFn

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

func (*RequestEntriesCommandFn) Load

func (*RequestEntriesCommandFn) Store

type RequestEntriesReturn

type RequestEntriesReturn struct {
	CacheDataEntries []DataEntry `json:"cacheDataEntries"` // Array of object store data entries.
	HasMore          bool        `json:"hasMore"`          // If true, there are more entries to fetch in the given range.
}

Jump to

Keyboard shortcuts

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