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 HttpGetRequest
- func (x *HttpGetRequest) GetUrl() string
- func (m *HttpGetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *HttpGetRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *HttpGetRequest) MarshalVT() (dAtA []byte, err error)
- func (x *HttpGetRequest) ProtoReflect() protoreflect.Message
- func (m *HttpGetRequest) SizeVT() (n int)
- func (m *HttpGetRequest) UnmarshalVT(dAtA []byte) error
- type HttpGetResponse
- func (x *HttpGetResponse) GetResponse() []byte
- func (m *HttpGetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *HttpGetResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *HttpGetResponse) MarshalVT() (dAtA []byte, err error)
- func (x *HttpGetResponse) ProtoReflect() protoreflect.Message
- func (m *HttpGetResponse) SizeVT() (n int)
- func (m *HttpGetResponse) UnmarshalVT(dAtA []byte) error
- type LogRequest
- func (x *LogRequest) GetMessage() string
- func (m *LogRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *LogRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *LogRequest) MarshalVT() (dAtA []byte, err error)
- func (x *LogRequest) ProtoReflect() protoreflect.Message
- func (m *LogRequest) SizeVT() (n int)
- func (m *LogRequest) UnmarshalVT(dAtA []byte) error
- type WazeroConfig
- type WazeroNewRuntime
Constants ¶
View Source
const GreeterPluginAPIVersion = 1
Variables ¶
Functions ¶
func WazeroModuleConfig ¶ added in v0.6.0
func WazeroModuleConfig(moduleConfig wazero.ModuleConfig) wazeroConfigOption
func WazeroRuntime ¶ added in v0.6.0
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 { // Sends a HTTP GET request HttpGet(context.Context, *HttpGetRequest) (*HttpGetResponse, error) // Shows a log message Log(context.Context, *LogRequest) (*emptypb.Empty, error) }
The host functions embedded into the plugin go:plugin type=host
type HttpGetRequest ¶
type HttpGetRequest struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*HttpGetRequest) GetUrl ¶
func (x *HttpGetRequest) GetUrl() string
func (*HttpGetRequest) MarshalToSizedBufferVT ¶
func (m *HttpGetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*HttpGetRequest) MarshalToVT ¶
func (m *HttpGetRequest) MarshalToVT(dAtA []byte) (int, error)
func (*HttpGetRequest) MarshalVT ¶
func (m *HttpGetRequest) MarshalVT() (dAtA []byte, err error)
func (*HttpGetRequest) ProtoReflect ¶
func (x *HttpGetRequest) ProtoReflect() protoreflect.Message
func (*HttpGetRequest) SizeVT ¶
func (m *HttpGetRequest) SizeVT() (n int)
func (*HttpGetRequest) UnmarshalVT ¶
func (m *HttpGetRequest) UnmarshalVT(dAtA []byte) error
type HttpGetResponse ¶
type HttpGetResponse struct { Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*HttpGetResponse) GetResponse ¶
func (x *HttpGetResponse) GetResponse() []byte
func (*HttpGetResponse) MarshalToSizedBufferVT ¶
func (m *HttpGetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*HttpGetResponse) MarshalToVT ¶
func (m *HttpGetResponse) MarshalToVT(dAtA []byte) (int, error)
func (*HttpGetResponse) MarshalVT ¶
func (m *HttpGetResponse) MarshalVT() (dAtA []byte, err error)
func (*HttpGetResponse) ProtoReflect ¶
func (x *HttpGetResponse) ProtoReflect() protoreflect.Message
func (*HttpGetResponse) SizeVT ¶
func (m *HttpGetResponse) SizeVT() (n int)
func (*HttpGetResponse) UnmarshalVT ¶
func (m *HttpGetResponse) UnmarshalVT(dAtA []byte) error
type LogRequest ¶
type LogRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*LogRequest) GetMessage ¶
func (x *LogRequest) GetMessage() string
func (*LogRequest) MarshalToSizedBufferVT ¶
func (m *LogRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*LogRequest) MarshalToVT ¶
func (m *LogRequest) MarshalToVT(dAtA []byte) (int, error)
func (*LogRequest) MarshalVT ¶
func (m *LogRequest) MarshalVT() (dAtA []byte, err error)
func (*LogRequest) ProtoReflect ¶
func (x *LogRequest) ProtoReflect() protoreflect.Message
func (*LogRequest) SizeVT ¶
func (m *LogRequest) SizeVT() (n int)
func (*LogRequest) UnmarshalVT ¶
func (m *LogRequest) UnmarshalVT(dAtA []byte) error
type WazeroConfig ¶ added in v0.6.0
type WazeroConfig struct {
// contains filtered or unexported fields
}
type WazeroNewRuntime ¶ added in v0.6.0
func DefaultWazeroRuntime ¶ added in v0.7.0
func DefaultWazeroRuntime() WazeroNewRuntime
Click to show internal directories.
Click to hide internal directories.