extensions

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Description: Implements the extension caller interface for interacting with extensions.

Package extensions consumes extensions in stencil

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionCaller

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

ExtensionCaller calls extension functions

func (*ExtensionCaller) Call

func (ec *ExtensionCaller) Call(args ...reflect.Value) (reflect.Value, error)

Call returns a function based on its path, e.g. test.callFunction

type Host

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

Host implements an extension host that handles registering extensions and executing them.

func NewHost

func NewHost() *Host

NewHost creates a new extension host

func (*Host) GetExtensionCaller

func (h *Host) GetExtensionCaller(ctx context.Context) (*ExtensionCaller, error)

GetExtensionCaller returns an extension caller that's aware of all extension functions

func (*Host) RegisterExtension

func (h *Host) RegisterExtension(ctx context.Context, source, name, version string) error

RegisterExtension registers a ext from a given source and compiles/downloads it. A client is then created that is able to communicate with the ext.

Directories

Path Synopsis
Description: Implements a plugin Implementation for the extensions host.
Description: Implements a plugin Implementation for the extensions host.
Package github implements helpers accessing github via the gh cli
Package github implements helpers accessing github via the gh cli

Jump to

Keyboard shortcuts

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