package cat
import "github.com/knqyf263/go-plugin/examples/wasi/cat"
Index ¶
- Constants
- Variables
- func WazeroModuleConfig(moduleConfig wazero.ModuleConfig) wazeroConfigOption
- func WazeroRuntime(newRuntime WazeroNewRuntime) wazeroConfigOption
- type FileCat
- type FileCatPlugin
- func NewFileCatPlugin(ctx context.Context, opts ...wazeroConfigOption) (*FileCatPlugin, error)
- func (p *FileCatPlugin) Load(ctx context.Context, pluginPath string) (fileCat, error)
- type FileCatReply
- func (x *FileCatReply) GetContent() string
- func (m *FileCatReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *FileCatReply) MarshalToVT(dAtA []byte) (int, error)
- func (m *FileCatReply) MarshalVT() (dAtA []byte, err error)
- func (x *FileCatReply) ProtoReflect() protoreflect.Message
- func (m *FileCatReply) SizeVT() (n int)
- func (m *FileCatReply) UnmarshalVT(dAtA []byte) error
- type FileCatRequest
- func (x *FileCatRequest) GetFilePath() string
- func (m *FileCatRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *FileCatRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *FileCatRequest) MarshalVT() (dAtA []byte, err error)
- func (x *FileCatRequest) ProtoReflect() protoreflect.Message
- func (m *FileCatRequest) SizeVT() (n int)
- func (m *FileCatRequest) UnmarshalVT(dAtA []byte) error
- type WazeroConfig
- type WazeroNewRuntime
Constants ¶
const FileCatPluginAPIVersion = 1
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func WazeroModuleConfig ¶
func WazeroModuleConfig(moduleConfig wazero.ModuleConfig) wazeroConfigOption
func WazeroRuntime ¶
func WazeroRuntime(newRuntime WazeroNewRuntime) wazeroConfigOption
Types ¶
type FileCat ¶
type FileCat interface { Cat(context.Context, *FileCatRequest) (*FileCatReply, error) }
go:plugin type=plugin
type FileCatPlugin ¶
type FileCatPlugin struct {
// contains filtered or unexported fields
}
func NewFileCatPlugin ¶
func NewFileCatPlugin(ctx context.Context, opts ...wazeroConfigOption) (*FileCatPlugin, error)
func (*FileCatPlugin) Load ¶
func (p *FileCatPlugin) Load(ctx context.Context, pluginPath string) (fileCat, error)
type FileCatReply ¶
type FileCatReply struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*FileCatReply) GetContent ¶
func (x *FileCatReply) GetContent() string
func (*FileCatReply) MarshalToSizedBufferVT ¶
func (m *FileCatReply) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*FileCatReply) MarshalToVT ¶
func (m *FileCatReply) MarshalToVT(dAtA []byte) (int, error)
func (*FileCatReply) MarshalVT ¶
func (m *FileCatReply) MarshalVT() (dAtA []byte, err error)
func (*FileCatReply) ProtoReflect ¶
func (x *FileCatReply) ProtoReflect() protoreflect.Message
func (*FileCatReply) SizeVT ¶
func (m *FileCatReply) SizeVT() (n int)
func (*FileCatReply) UnmarshalVT ¶
func (m *FileCatReply) UnmarshalVT(dAtA []byte) error
type FileCatRequest ¶
type FileCatRequest struct { FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` // contains filtered or unexported fields }
func (*FileCatRequest) GetFilePath ¶
func (x *FileCatRequest) GetFilePath() string
func (*FileCatRequest) MarshalToSizedBufferVT ¶
func (m *FileCatRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*FileCatRequest) MarshalToVT ¶
func (m *FileCatRequest) MarshalToVT(dAtA []byte) (int, error)
func (*FileCatRequest) MarshalVT ¶
func (m *FileCatRequest) MarshalVT() (dAtA []byte, err error)
func (*FileCatRequest) ProtoReflect ¶
func (x *FileCatRequest) ProtoReflect() protoreflect.Message
func (*FileCatRequest) SizeVT ¶
func (m *FileCatRequest) SizeVT() (n int)
func (*FileCatRequest) UnmarshalVT ¶
func (m *FileCatRequest) UnmarshalVT(dAtA []byte) error
type WazeroConfig ¶
type WazeroConfig struct {
// contains filtered or unexported fields
}
type WazeroNewRuntime ¶
func DefaultWazeroRuntime ¶
func DefaultWazeroRuntime() WazeroNewRuntime
Source Files ¶
cat.pb.go cat_host.pb.go cat_options.pb.go cat_vtproto.pb.go
- Version
- v0.8.0
- Published
- Jun 25, 2023
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 1 day ago –
Tools for package owners.