Documentation ¶
Index ¶
- Variables
- func GetStartupHandle(info HandleInfo) zx.Handle
- func Serve(ctx context.Context, stub fidl.Stub, req zx.Channel, opts ServeOptions)
- type Connector
- type Context
- type Directory
- type DirectoryWrapper
- type File
- type FileWrapper
- type HandleInfo
- type HandleType
- type Node
- type OutDirectory
- type Reader
- type ServeOptions
- type Service
- func (s *Service) Clone(ctx fidl.Context, flags uint32, req fidlio.NodeWithCtxInterfaceRequest) error
- func (*Service) Close(fidl.Context) (int32, error)
- func (*Service) Close2(fidl.Context) (fidlio.NodeClose2Result, error)
- func (*Service) Describe(fidl.Context) (fidlio.NodeInfo, error)
- func (*Service) GetAttr(fidl.Context) (int32, fidlio.NodeAttributes, error)
- func (*Service) NodeGetFlags(fidl.Context) (int32, uint32, error)
- func (*Service) NodeSetFlags(_ fidl.Context, flags uint32) (int32, error)
- func (*Service) SetAttr(_ fidl.Context, flags uint32, attributes fidlio.NodeAttributes) (int32, error)
- func (*Service) Sync(fidl.Context) (int32, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTooManyBytesInResponse indicates too many bytes in a response message. ErrTooManyBytesInResponse = errors.New("too many bytes in a response") // ErrTooManyHandlesInResponse indicates too many handles in a response message. ErrTooManyHandlesInResponse = errors.New("too many handles in a response") )
Functions ¶
func GetStartupHandle ¶
func GetStartupHandle(info HandleInfo) zx.Handle
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 ¶
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) Environment ¶
func (c *Context) Environment() *sys.EnvironmentWithCtxInterface
func (*Context) Launcher ¶
func (c *Context) Launcher() *sys.LauncherWithCtxInterface
type DirectoryWrapper ¶
type DirectoryWrapper struct {
Directory Directory
}
func (*DirectoryWrapper) GetDirectory ¶
func (dir *DirectoryWrapper) GetDirectory() fidlio.DirectoryWithCtx
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 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 ¶
AddService registers a named handler in the outgoing service directory.
The handler function is called serially with each incoming request matching the name. It must not block, and is expected to handle incoming calls on the request.
type ServeOptions ¶
type ServeOptions struct { // Concurrent controls if requests on the channel are handled concurrently or // serially. Concurrent bool // KeepChannelAlive controls if the channel is closed when Serve returns. KeepChannelAlive bool // OnError is a logging hook that will be called with errors that cannot be // propagated. Must be non-nil. OnError func(error) }
ServeOptions contains options for Serve.
type Service ¶
type Service struct { *fidlio.NodeWithCtxTransitionalBase // TODO(https://fxbug.dev/77623): Remove once transitions are complete. // AddFn is called serially with an incoming request. It must not block, and // is expected to handle incoming calls on the request. AddFn func(context.Context, zx.Channel) error }
func (*Service) NodeSetFlags ¶
Click to show internal directories.
Click to hide internal directories.