Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DescriptorIGarbageCollectCallback = "android.hardware.health.storage.IGarbageCollectCallback"
View Source
const DescriptorIStorage = "android.hardware.health.storage.IStorage"
View Source
const (
	MethodIGarbageCollectCallbackOnFinish = "onFinish"
)
View Source
const (
	MethodIStorageGarbageCollect = "garbageCollect"
)
View Source
const (
	TransactionIGarbageCollectCallbackOnFinish = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIStorageGarbageCollect = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageCollectCallbackProxy

type GarbageCollectCallbackProxy struct {
	Remote binder.IBinder
}

func NewGarbageCollectCallbackProxy

func NewGarbageCollectCallbackProxy(
	remote binder.IBinder,
) *GarbageCollectCallbackProxy

func (*GarbageCollectCallbackProxy) AsBinder

func (*GarbageCollectCallbackProxy) OnFinish

func (p *GarbageCollectCallbackProxy) OnFinish(
	ctx context.Context,
	result Result,
) error

type GarbageCollectCallbackStub

type GarbageCollectCallbackStub struct {
	Impl      IGarbageCollectCallback
	Transport binder.VersionAwareTransport
}

GarbageCollectCallbackStub dispatches incoming binder transactions to a typed IGarbageCollectCallback implementation.

func (*GarbageCollectCallbackStub) Descriptor

func (s *GarbageCollectCallbackStub) Descriptor() string

func (*GarbageCollectCallbackStub) OnTransaction

func (s *GarbageCollectCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type IGarbageCollectCallback

type IGarbageCollectCallback interface {
	AsBinder() binder.IBinder
	OnFinish(ctx context.Context, result Result) error
}

func NewGarbageCollectCallbackStub

func NewGarbageCollectCallbackStub(
	impl IGarbageCollectCallbackServer,
) IGarbageCollectCallback

NewGarbageCollectCallbackStub creates a server-side IGarbageCollectCallback wrapping the given server implementation. The returned value satisfies IGarbageCollectCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IGarbageCollectCallbackServer

type IGarbageCollectCallbackServer interface {
	OnFinish(ctx context.Context, result Result) error
}

IGarbageCollectCallbackServer is the server-side interface that user implementations provide to NewGarbageCollectCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IStorage

type IStorage interface {
	AsBinder() binder.IBinder
	GarbageCollect(ctx context.Context, timeoutSeconds int64, callback IGarbageCollectCallback) error
}

func NewStorageStub

func NewStorageStub(
	impl IStorageServer,
) IStorage

NewStorageStub creates a server-side IStorage wrapping the given server implementation. The returned value satisfies IStorage and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IStorageServer

type IStorageServer interface {
	GarbageCollect(ctx context.Context, timeoutSeconds int64, callback IGarbageCollectCallback) error
}

IStorageServer is the server-side interface that user implementations provide to NewStorageStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type Result

type Result int32
const (
	ResultSUCCESS      Result = 0
	ResultIoError      Result = 1
	ResultUnknownError Result = 2
)

type StorageProxy

type StorageProxy struct {
	Remote binder.IBinder
}

func NewStorageProxy

func NewStorageProxy(
	remote binder.IBinder,
) *StorageProxy

func (*StorageProxy) AsBinder

func (p *StorageProxy) AsBinder() binder.IBinder

func (*StorageProxy) GarbageCollect

func (p *StorageProxy) GarbageCollect(
	ctx context.Context,
	timeoutSeconds int64,
	callback IGarbageCollectCallback,
) error

type StorageStub

type StorageStub struct {
	Impl      IStorage
	Transport binder.VersionAwareTransport
}

StorageStub dispatches incoming binder transactions to a typed IStorage implementation.

func (*StorageStub) Descriptor

func (s *StorageStub) Descriptor() string

func (*StorageStub) OnTransaction

func (s *StorageStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

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