Documentation ¶
Index ¶
- Constants
- Variables
- func WazeroModuleConfig(moduleConfig wazero.ModuleConfig) wazeroConfigOption
- func WazeroRuntime(newRuntime WazeroNewRuntime) wazeroConfigOption
- type GreetReply
- func (x *GreetReply) GetMessage() string
- func (m *GreetReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GreetReply) MarshalToVT(dAtA []byte) (int, error)
- func (m *GreetReply) MarshalVT() (dAtA []byte, err error)
- func (x *GreetReply) ProtoReflect() protoreflect.Message
- func (m *GreetReply) SizeVT() (n int)
- func (m *GreetReply) UnmarshalVT(dAtA []byte) error
- type GreetRequest
- func (x *GreetRequest) GetName() string
- func (m *GreetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GreetRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *GreetRequest) MarshalVT() (dAtA []byte, err error)
- func (x *GreetRequest) ProtoReflect() protoreflect.Message
- func (m *GreetRequest) SizeVT() (n int)
- func (m *GreetRequest) UnmarshalVT(dAtA []byte) error
- type Greeter
- type GreeterPlugin
- type HostFunctions
- type ParseJsonRequest
- func (x *ParseJsonRequest) GetContent() []byte
- func (m *ParseJsonRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ParseJsonRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *ParseJsonRequest) MarshalVT() (dAtA []byte, err error)
- func (x *ParseJsonRequest) ProtoReflect() protoreflect.Message
- func (m *ParseJsonRequest) SizeVT() (n int)
- func (m *ParseJsonRequest) UnmarshalVT(dAtA []byte) error
- type ParseJsonResponse
- func (x *ParseJsonResponse) GetResponse() *Person
- func (m *ParseJsonResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ParseJsonResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ParseJsonResponse) MarshalVT() (dAtA []byte, err error)
- func (x *ParseJsonResponse) ProtoReflect() protoreflect.Message
- func (m *ParseJsonResponse) SizeVT() (n int)
- func (m *ParseJsonResponse) UnmarshalVT(dAtA []byte) error
- type Person
- func (x *Person) GetAge() int64
- func (x *Person) GetName() string
- func (m *Person) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Person) MarshalToVT(dAtA []byte) (int, error)
- func (m *Person) MarshalVT() (dAtA []byte, err error)
- func (x *Person) ProtoReflect() protoreflect.Message
- func (m *Person) SizeVT() (n int)
- func (m *Person) UnmarshalVT(dAtA []byte) error
- type WazeroConfig
- type WazeroNewRuntime
Constants ¶
View Source
const GreeterPluginAPIVersion = 1
Variables ¶
Functions ¶
func WazeroModuleConfig ¶
func WazeroModuleConfig(moduleConfig wazero.ModuleConfig) wazeroConfigOption
func WazeroRuntime ¶
func WazeroRuntime(newRuntime WazeroNewRuntime) wazeroConfigOption
Types ¶
type GreetReply ¶
type GreetReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*GreetReply) GetMessage ¶
func (x *GreetReply) GetMessage() string
func (*GreetReply) MarshalToSizedBufferVT ¶
func (m *GreetReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GreetReply) MarshalToVT ¶
func (m *GreetReply) MarshalToVT(dAtA []byte) (int, error)
func (*GreetReply) MarshalVT ¶
func (m *GreetReply) MarshalVT() (dAtA []byte, err error)
func (*GreetReply) ProtoReflect ¶
func (x *GreetReply) ProtoReflect() protoreflect.Message
func (*GreetReply) SizeVT ¶
func (m *GreetReply) SizeVT() (n int)
func (*GreetReply) UnmarshalVT ¶
func (m *GreetReply) UnmarshalVT(dAtA []byte) error
type GreetRequest ¶
type GreetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*GreetRequest) GetName ¶
func (x *GreetRequest) GetName() string
func (*GreetRequest) MarshalToSizedBufferVT ¶
func (m *GreetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GreetRequest) MarshalToVT ¶
func (m *GreetRequest) MarshalToVT(dAtA []byte) (int, error)
func (*GreetRequest) MarshalVT ¶
func (m *GreetRequest) MarshalVT() (dAtA []byte, err error)
func (*GreetRequest) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) SizeVT ¶
func (m *GreetRequest) SizeVT() (n int)
func (*GreetRequest) UnmarshalVT ¶
func (m *GreetRequest) UnmarshalVT(dAtA []byte) error
type Greeter ¶
type Greeter interface { // Sends a greeting Greet(context.Context, *GreetRequest) (*GreetReply, error) }
The greeting service definition. go:plugin type=plugin version=1
type GreeterPlugin ¶
type GreeterPlugin struct {
// contains filtered or unexported fields
}
func NewGreeterPlugin ¶
func NewGreeterPlugin(ctx context.Context, opts ...wazeroConfigOption) (*GreeterPlugin, error)
func (*GreeterPlugin) Load ¶
func (p *GreeterPlugin) Load(ctx context.Context, pluginPath string, hostFunctions HostFunctions) (greeter, error)
type HostFunctions ¶
type HostFunctions interface {
ParseJson(context.Context, *ParseJsonRequest) (*ParseJsonResponse, error)
}
The host functions embedded into the plugin go:plugin type=host
type ParseJsonRequest ¶
type ParseJsonRequest struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*ParseJsonRequest) GetContent ¶
func (x *ParseJsonRequest) GetContent() []byte
func (*ParseJsonRequest) MarshalToSizedBufferVT ¶
func (m *ParseJsonRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ParseJsonRequest) MarshalToVT ¶
func (m *ParseJsonRequest) MarshalToVT(dAtA []byte) (int, error)
func (*ParseJsonRequest) MarshalVT ¶
func (m *ParseJsonRequest) MarshalVT() (dAtA []byte, err error)
func (*ParseJsonRequest) ProtoReflect ¶
func (x *ParseJsonRequest) ProtoReflect() protoreflect.Message
func (*ParseJsonRequest) SizeVT ¶
func (m *ParseJsonRequest) SizeVT() (n int)
func (*ParseJsonRequest) UnmarshalVT ¶
func (m *ParseJsonRequest) UnmarshalVT(dAtA []byte) error
type ParseJsonResponse ¶
type ParseJsonResponse struct { Response *Person `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*ParseJsonResponse) GetResponse ¶
func (x *ParseJsonResponse) GetResponse() *Person
func (*ParseJsonResponse) MarshalToSizedBufferVT ¶
func (m *ParseJsonResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ParseJsonResponse) MarshalToVT ¶
func (m *ParseJsonResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ParseJsonResponse) MarshalVT ¶
func (m *ParseJsonResponse) MarshalVT() (dAtA []byte, err error)
func (*ParseJsonResponse) ProtoReflect ¶
func (x *ParseJsonResponse) ProtoReflect() protoreflect.Message
func (*ParseJsonResponse) SizeVT ¶
func (m *ParseJsonResponse) SizeVT() (n int)
func (*ParseJsonResponse) UnmarshalVT ¶
func (m *ParseJsonResponse) UnmarshalVT(dAtA []byte) error
type Person ¶
type Person struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` // contains filtered or unexported fields }
func (*Person) MarshalToSizedBufferVT ¶
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
func (*Person) UnmarshalVT ¶
type WazeroConfig ¶
type WazeroConfig struct {
// contains filtered or unexported fields
}
type WazeroNewRuntime ¶
func DefaultWazeroRuntime ¶
func DefaultWazeroRuntime() WazeroNewRuntime
Click to show internal directories.
Click to hide internal directories.