component

package
v0.0.0-...-2208570 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 20 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStartupHandle

func GetStartupHandle(info HandleInfo) zx.Handle

func ServeExclusive

func ServeExclusive(ctx fidl.Context, stub fidl.Stub, req zx.Channel, onError func(error))

ServeExclusive assumes ownership of req and serially serves requests on it via stub until ctx is called or req's peer is closed. ServeExclusive closes req before returning.

Types

type Connector

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

func (*Connector) ConnectToEnvService

func (c *Connector) ConnectToEnvService(r fidl.ServiceRequest)

type Context

type Context struct {

	// OutgoingService is the directory served on the startup directory request.
	//
	// OutgoingService is cleared when BindStartupHandle is called to prevent further mutation which
	// is not supported by this implementation, though it is permitted by fuchsia.io.Directory.
	OutgoingService OutDirectory
	// contains filtered or unexported fields
}

func NewContextFromStartupInfo

func NewContextFromStartupInfo() *Context

NewContextFromStartupInfo connects to the service root directory and registers debug services.

func (*Context) BindStartupHandle

func (c *Context) BindStartupHandle(ctx fidl.Context)

BindStartupHandle takes the startup handle if it's not already taken and serves the out directory with all services that have been registered on (*Context).OutgoingService.

New services must not be added after BindStartupHandle is called.

BindStartupHandle blocks until the context is canceled.

func (*Context) ConnectToEnvService

func (c *Context) ConnectToEnvService(r fidl.ServiceRequest)

func (*Context) Connector

func (c *Context) Connector() *Connector

func (*Context) Environment

func (c *Context) Environment() *sys.EnvironmentWithCtxInterface

func (*Context) Launcher

func (c *Context) Launcher() *sys.LauncherWithCtxInterface

type Directory

type Directory interface {
	Get(string) (Node, bool)
	ForEach(func(string, Node))
}

type DirectoryWrapper

type DirectoryWrapper struct {
	Directory Directory
}

func (*DirectoryWrapper) GetDirectory

func (dir *DirectoryWrapper) GetDirectory() fidlio.DirectoryWithCtx

type File

type File interface {
	GetReader() (Reader, uint64)
	GetVMO() zx.VMO
}

type FileWrapper

type FileWrapper struct {
	File File
}

type HandleInfo

type HandleInfo struct {
	Type HandleType
	Arg  uint16
}

type HandleType

type HandleType uint16
const (
	HandleDirectoryRequest HandleType = 0x3B
	HandleAppServices      HandleType = 0x43

	HandleUser0 HandleType = 0xF0
	HandleUser1 HandleType = 0xF1
	HandleUser2 HandleType = 0xF2
)

type Node

type Node interface {
	// contains filtered or unexported methods
}

type OutDirectory

type OutDirectory mapDirectory

func (OutDirectory) AddDebug

func (od OutDirectory) AddDebug(name string, n Node)

func (OutDirectory) AddDiagnostics

func (od OutDirectory) AddDiagnostics(name string, n Node)

func (OutDirectory) AddService

func (od OutDirectory) AddService(name string, addFn addFn)

type Reader

type Reader interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

type Service

type Service struct {
	*fidlio.NodeWithCtxTransitionalBase
	AddFn addFn
}

TODO(fxbug.dev/37419): Remove TransitionalBase after methods landed.

func (*Service) Clone

func (*Service) Close

func (s *Service) Close(fidl.Context) (int32, error)

func (*Service) Describe

func (s *Service) Describe(fidl.Context) (fidlio.NodeInfo, error)

func (*Service) GetAttr

func (*Service) SetAttr

func (s *Service) SetAttr(_ fidl.Context, flags uint32, attributes fidlio.NodeAttributes) (int32, error)

func (*Service) Sync

func (s *Service) Sync(fidl.Context) (int32, error)

Jump to

Keyboard shortcuts

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