Documentation
¶
Overview ¶
Package storebind binds the WIT world app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is an instance of a component of the WIT world app.
func Instantiate ¶
func Instantiate(ctx context.Context, r wazy.Runtime, wasm []byte, imports Imports, opts ...component.Option) (*App, error)
Instantiate instantiates a component of the world app, with imports implementing its imports. opts are passed on to component.Instantiate, for what the bindings leave to the host, such as WASI.
type Bucket ¶
type Bucket uint32
Bucket is the host's representation of the WIT resource example:store/kv@1.0.0.bucket: the value the host returns from its constructor, and receives back as self.
type Error ¶
type Error struct {
Case ErrorCase
// contains filtered or unexported fields
}
Error is the WIT variant error: Case says which case it holds.
func ErrorDenied ¶
ErrorDenied is the denied case of Error, holding v.
func ErrorNoSuchBucket ¶
func ErrorNoSuchBucket() Error
ErrorNoSuchBucket is the no-such-bucket case of Error.
type Imports ¶
type Imports struct {
Kv Kv
}
Imports are the host's implementations of the world's imports.
type Kv ¶
type Kv interface {
NewBucket(ctx context.Context, name string) (Bucket, error)
BucketPut(ctx context.Context, self Bucket, key string, value []byte) error
BucketGet(ctx context.Context, self Bucket, key string) (*[]byte, error)
ListKeys(ctx context.Context, b Bucket) (witgo.Result[[]string, Error], error)
// DropBucket releases a Bucket the guest dropped.
DropBucket(ctx context.Context, self Bucket) error
}
Kv is the host's implementation of example:store/kv@1.0.0.
Directories
¶
| Path | Synopsis |
|---|---|
|
tree
|
|
|
app
Package app binds the WIT world app.
|
Package app binds the WIT world app. |
|
example/store/v1.0.0/kv
Package kv binds the WIT interface example:store/kv@1.0.0, for a host implementing it.
|
Package kv binds the WIT interface example:store/kv@1.0.0, for a host implementing it. |
|
Package with binds the WIT world app.
|
Package with binds the WIT world app. |