Documentation
¶
Overview ¶
Package ccgo holds the Go translation of the C engine's portable core (lib/plugin core_sources: the wire rules, validators, endpoint, package and frame checks, and the guest engine) and the calls into it. The translation is generated, one file per platform, by the tools module next to this directory; see ../../../README.md.
Index ¶
- Constants
- func Call(string, []byte) ([]byte, error)
- type InstanceLease
- type Instances
- type LaunchOptions
- type ProcessOptions
- type Session
- func (*Session) Abort() error
- func (*Session) Call(context.Context, plugin.ContractRef, string, json.RawMessage) (json.RawMessage, error)
- func (*Session) Close(context.Context) error
- func (*Session) Descriptor() plugin.Descriptor
- func (*Session) Done() <-chan struct{}
- func (*Session) DrainContext(context.Context) error
- func (*Session) State() plugin.State
- func (*Session) Stderr() string
Constants ¶
const Available = false
Available is false where no translation has been generated for the platform.
const HostAvailable = false
HostAvailable is false where no translation of the host has been generated for the platform.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InstanceLease ¶
InstanceLease is unavailable on this platform.
func (*InstanceLease[T]) Release ¶
func (*InstanceLease[T]) Release() error
type Instances ¶
type Instances[T any] struct{}
Instances is unavailable on this platform: NewInstances reports plugin.ErrUnsupported.
func NewInstances ¶
func NewInstances[T any](instancepkg.Options[T]) (*Instances[T], error)
NewInstances reports plugin.ErrUnsupported: this platform has no translation of the host.
type LaunchOptions ¶
type LaunchOptions struct {
ProcessOptions
// Directory is the child's working directory; empty inherits the host's. It must be absolute.
Directory string
// StderrBytes bounds the retained stderr; zero retains 4096 bytes.
StderrBytes int
}
LaunchOptions starts a reviewed executable the way an installed package is run: like ProcessOptions, but with a working directory, bounded capture of the child's stderr and a scrubbed base environment of PATH. The environment entries are added to it (an entry named PATH replaces it). Executable must be the absolute path of a regular file.
type ProcessOptions ¶
ProcessOptions launches a reviewed executable directly, without a shell. Environment is explicit and never inherits the embedding process environment.
type Session ¶
type Session struct{}
Session is unavailable on this platform: every constructor reports plugin.ErrUnsupported.
func OpenProcess ¶
func OpenProcess(context.Context, plugin.Descriptor, LaunchOptions, plugin.Options) (*Session, error)
OpenProcess reports plugin.ErrUnsupported: this platform has no translation of the host.
func (*Session) Call ¶
func (*Session) Call(context.Context, plugin.ContractRef, string, json.RawMessage) (json.RawMessage, error)
func (*Session) Descriptor ¶
func (*Session) Descriptor() plugin.Descriptor