resolve

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 37 Imported by: 22

Documentation

Overview

Package resolve exposes functions for performing complex data queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIState

func APIState(ctx context.Context, p *path.State) (interface{}, error)

APIState resolves the specific API state at a requested point in a capture.

func ArrayIndex

func ArrayIndex(ctx context.Context, p *path.ArrayIndex) (interface{}, error)

ArrayIndex resolves and returns the array or slice element from the path p.

func As

func As(ctx context.Context, p *path.As) (interface{}, error)

As resolves and returns the object at p transformed to the requested type.

func Blob

func Blob(ctx context.Context, p *path.Blob) ([]byte, error)

Blob resolves and returns the byte slice from the path p.

func Capture

func Capture(ctx context.Context, p *path.Capture) (*service.Capture, error)

Capture resolves and returns the capture from the path p.

func Cmd

func Cmd(ctx context.Context, p *path.Command) (api.Cmd, error)

Cmd resolves and returns the command from the path p.

func Cmds

func Cmds(ctx context.Context, p *path.Capture) ([]api.Cmd, error)

Cmds resolves and returns the command list from the path p.

func CommandThumbnail

func CommandThumbnail(ctx context.Context, w, h uint32, f *image.Format, p *path.Command) (*image.Info, error)

CommandThumbnail resolves and returns the thumbnail for the framebuffer at p.

func CommandTree

func CommandTree(ctx context.Context, c *path.CommandTree) (*service.CommandTree, error)

CommandTree resolves the specified command tree path.

func CommandTreeNode

func CommandTreeNode(ctx context.Context, c *path.CommandTreeNode) (*service.CommandTreeNode, error)

CommandTreeNode resolves the specified command tree node path.

func CommandTreeNodeForCommand

func CommandTreeNodeForCommand(ctx context.Context, p *path.CommandTreeNodeForCommand) (*path.CommandTreeNode, error)

CommandTreeNodeForCommand returns the path to the CommandTreeNode that represents the specified command.

func CommandTreeNodeThumbnail

func CommandTreeNodeThumbnail(ctx context.Context, w, h uint32, f *image.Format, p *path.CommandTreeNode) (*image.Info, error)

CommandTreeNodeThumbnail resolves and returns the thumbnail for the framebuffer at p.

func Commands

func Commands(ctx context.Context, p *path.Commands) (*service.Commands, error)

Commands resolves and returns the command list from the path p.

func ConstantSet

func ConstantSet(ctx context.Context, p *path.ConstantSet) (*service.ConstantSet, error)

ConstantSet resolves and returns the constant set from the path p.

func Contexts

func Contexts(ctx context.Context, p *path.Contexts) (*service.Contexts, error)

Contexts resolves the list of contexts belonging to a capture.

func Device

func Device(ctx context.Context, p *path.Device) (*device.Instance, error)

Device resolves and returns the device from the path p.

func Events

func Events(ctx context.Context, p *path.Events) (*service.Events, error)

Events resolves and returns the event list from the path p.

func Field

func Field(ctx context.Context, p *path.Field) (interface{}, error)

Field resolves and returns the field from the path p.

func Find

Find performs a search using req and calling handler for each result.

func Follow

func Follow(ctx context.Context, p *path.Any) (*path.Any, error)

Follow resolves the path to the object that the value at Path links to. If the value at Path does not link to anything then nil is returned.

func FramebufferAttachment

func FramebufferAttachment(
	ctx context.Context,
	device *path.Device,
	after *path.Command,
	attachment api.FramebufferAttachment,
	settings *service.RenderSettings,
	hints *service.UsageHints,
) (*path.ImageInfo, error)

FramebufferAttachment resolves the specified framebuffer attachment at the specified point in a capture.

func FramebufferAttachmentInfo

func FramebufferAttachmentInfo(ctx context.Context, after *path.Command, att api.FramebufferAttachment) (framebufferAttachmentInfo, error)

FramebufferAttachmentInfo returns the framebuffer dimensions and format after a given atom in the given capture, atom and attachment. The first call to getFramebufferInfo for a given capture/context will trigger a computation for all atoms of this capture, which will be cached to the database for subsequent calls, regardless of the given atom.

func Get

func Get(ctx context.Context, p *path.Any) (interface{}, error)

Get resolves the object, value or memory at p.

func GlobalState

func GlobalState(ctx context.Context, p *path.State) (*api.State, error)

GlobalState resolves the global *api.State at a requested point in a capture.

func ImageInfo

func ImageInfo(ctx context.Context, p *path.ImageInfo) (*image.Info, error)

ImageInfo resolves and returns the ImageInfo from the path p.

func MapIndex

func MapIndex(ctx context.Context, p *path.MapIndex) (interface{}, error)

MapIndex resolves and returns the map value from the path p.

func Memory

func Memory(ctx context.Context, p *path.Memory) (*service.Memory, error)

Memory resolves and returns the memory from the path p.

func Mesh

func Mesh(ctx context.Context, p *path.Mesh) (*api.Mesh, error)

Mesh resolves and returns the Mesh from the path p.

func NCmds

func NCmds(ctx context.Context, p *path.Capture, n uint64) ([]api.Cmd, error)

NCmds resolves and returns the command list from the path p, ensuring that the number of commands is at least N.

func Parameter

func Parameter(ctx context.Context, p *path.Parameter) (interface{}, error)

Parameter resolves and returns the parameter from the path p.

func Report

func Report(ctx context.Context, p *path.Report) (*service.Report, error)

Report resolves the report for the given path.

func ResolveInternal

func ResolveInternal(ctx context.Context, p path.Node) (interface{}, error)

ResolveInternal resolves and returns the object, value or memory at the path p without converting the potentially internal result to a service representation.

func ResolveService

func ResolveService(ctx context.Context, p path.Node) (interface{}, error)

ResolveService resolves and returns the object, value or memory at the path p, converting the final result to the service representation.

func ResourceData

func ResourceData(ctx context.Context, p *path.ResourceData) (interface{}, error)

ResourceData resolves the data of the specified resource at the specified point in the capture.

func ResourceDataThumbnail

func ResourceDataThumbnail(ctx context.Context, w, h uint32, f *image.Format, p *path.ResourceData) (*image.Info, error)

ResourceDataThumbnail resolves and returns the thumbnail for the resource at p.

func ResourceMeta

func ResourceMeta(ctx context.Context, id *path.ID, after *path.Command) (*api.ResourceMeta, error)

ResourceMeta returns the metadata for the specified resource.

func Resources

func Resources(ctx context.Context, c *path.Capture) (*service.Resources, error)

Resources resolves all the resources used by the specified capture.

func Result

func Result(ctx context.Context, p *path.Result) (interface{}, error)

Result resolves and returns the command's result from the path p.

func Set

func Set(ctx context.Context, p *path.Any, v interface{}) (*path.Any, error)

Set creates a copy of the capture referenced by the request's path, but with the object, value or memory at p replaced with v. The path returned is identical to p, but with the base changed to refer to the new capture.

func Slice

func Slice(ctx context.Context, p *path.Slice) (interface{}, error)

Slice resolves and returns the subslice from the path p.

func StateTree

func StateTree(ctx context.Context, c *path.StateTree) (*service.StateTree, error)

StateTree resolves the specified state tree path.

func StateTreeNode

func StateTreeNode(ctx context.Context, p *path.StateTreeNode) (*service.StateTreeNode, error)

StateTreeNode resolves the specified command tree node path.

func StateTreeNodeForPath

func StateTreeNodeForPath(ctx context.Context, p *path.StateTreeNodeForPath) (*path.StateTreeNode, error)

StateTreeNodeForPath returns the path to the StateTreeNode representing the path p.

func Thumbnail

func Thumbnail(ctx context.Context, p *path.Thumbnail) (*image.Info, error)

Thumbnail resolves and returns the thumbnail from the path p.

Types

type AttachmentFramebufferChanges

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

AttachmentFramebufferChanges describes the list of attachment changes over the span of the entire capture.

func FramebufferChanges

func FramebufferChanges(ctx context.Context, c *path.Capture) (*AttachmentFramebufferChanges, error)

FramebufferChanges returns the list of attachment changes over the span of the entire capture.

type IndexRange

type IndexRange struct {
	First uint32
	Count uint32
}

IndexRange represents the range of indices which were referenced by index buffer.

func IndexLimits

func IndexLimits(ctx context.Context, data id.ID, count int, size int, littleEndian bool) (*IndexRange, error)

IndexLimits returns the range of indices which were referenced by index buffer with identifier id. The buffer holds count elements, each of size bytes.

type ResolvedResources

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

ResolvedResources contains all of the resolved resources for a particular point in the trace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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