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

binder

package
v0.0.5 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 DescriptorIBenchmark = "android.tests.binder.IBenchmark"
View Source
const (
	MethodIBenchmarkSendVec = "sendVec"
)
View Source
const (
	TransactionIBenchmarkSendVec = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchmarkProxy

type BenchmarkProxy struct {
	Remote binder.IBinder
}

func NewBenchmarkProxy

func NewBenchmarkProxy(
	remote binder.IBinder,
) *BenchmarkProxy

func (*BenchmarkProxy) AsBinder

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

func (*BenchmarkProxy) SendVec

func (p *BenchmarkProxy) SendVec(
	ctx context.Context,
	data []byte,
) ([]byte, error)

type BenchmarkStub

type BenchmarkStub struct {
	Impl      IBenchmark
	Transport binder.VersionAwareTransport
}

BenchmarkStub dispatches incoming binder transactions to a typed IBenchmark implementation.

func (*BenchmarkStub) Descriptor

func (s *BenchmarkStub) Descriptor() string

func (*BenchmarkStub) OnTransaction

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

type IBenchmark

type IBenchmark interface {
	AsBinder() binder.IBinder
	SendVec(ctx context.Context, data []byte) ([]byte, error)
}

func NewBenchmarkStub

func NewBenchmarkStub(
	impl IBenchmarkServer,
) IBenchmark

NewBenchmarkStub creates a server-side IBenchmark wrapping the given server implementation. The returned value satisfies IBenchmark 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 IBenchmarkServer

type IBenchmarkServer interface {
	SendVec(ctx context.Context, data []byte) ([]byte, error)
}

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

Jump to

Keyboard shortcuts

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