extensions

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Overview

Package extensions provides extension functionality to GAPIS.

Extensions would ideally be plugins, but golang still doesn't have cross platform support. See: https://github.com/golang/go/issues/19282

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(e Extension)

Register registers the extension e.

Types

type EventProvider added in v0.6.1

type EventProvider func(ctx context.Context, id api.CmdID, cmd api.Cmd, s *api.GlobalState) []*service.Event

EventProvider is a function that produces events for the given command and state.

type Extension

type Extension struct {
	// Name of the extension.
	Name string
	// AdjustContexts lets the extension rename or reprioritize the list of
	// contexts.
	AdjustContexts func(context.Context, []*api.ContextInfo)
	// Custom command groupers.
	CmdGroupers func(ctx context.Context, p *path.CommandTree) []cmdgrouper.Grouper
	// Custom events provider.
	Events func(ctx context.Context, p *path.Events) EventProvider
}

Extension is a GAPIS extension. It should be registered at application initialization with Register.

func Get

func Get() []Extension

Get returns the full list of registered extensions.

Directories

Path Synopsis
Package unity provides GAPIS extensions that handle Unity engine features.
Package unity provides GAPIS extensions that handle Unity engine features.

Jump to

Keyboard shortcuts

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