Documentation ¶
Index ¶
- Variables
- type BlockClient
- func (b *BlockClient) Accept() error
- func (b *BlockClient) Bytes() []byte
- func (b *BlockClient) Height() uint64
- func (b *BlockClient) ID() ids.ID
- func (b *BlockClient) Parent() ids.ID
- func (b *BlockClient) Reject() error
- func (b *BlockClient) Status() choices.Status
- func (b *BlockClient) Verify() error
- type Factory
- type Plugin
- type VMClient
- func (vm *VMClient) Bootstrapped() error
- func (vm *VMClient) Bootstrapping() error
- func (vm *VMClient) Connected(id ids.ShortID) error
- func (vm *VMClient) CreateHandlers() (map[string]*common.HTTPHandler, error)
- func (vm *VMClient) CreateStaticHandlers() (map[string]*common.HTTPHandler, error)
- func (vm *VMClient) Disconnected(id ids.ShortID) error
- func (vm *VMClient) HealthCheck() (interface{}, error)
- func (vm *VMClient) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error
- func (vm *VMClient) SetPreference(id ids.ID) error
- func (vm *VMClient) SetProcess(proc *plugin.Client)
- func (vm *VMClient) Shutdown() error
- func (vm *VMClient) Version() (string, error)
- type VMServer
- func (vm *VMServer) BlockAccept(_ context.Context, req *vmproto.BlockAcceptRequest) (*vmproto.BlockAcceptResponse, error)
- func (vm *VMServer) BlockReject(_ context.Context, req *vmproto.BlockRejectRequest) (*vmproto.BlockRejectResponse, error)
- func (vm *VMServer) BlockVerify(_ context.Context, req *vmproto.BlockVerifyRequest) (*vmproto.BlockVerifyResponse, error)
- func (vm *VMServer) Bootstrapped(context.Context, *vmproto.BootstrappedRequest) (*vmproto.BootstrappedResponse, error)
- func (vm *VMServer) Bootstrapping(context.Context, *vmproto.BootstrappingRequest) (*vmproto.BootstrappingResponse, error)
- func (vm *VMServer) BuildBlock(_ context.Context, _ *vmproto.BuildBlockRequest) (*vmproto.BuildBlockResponse, error)
- func (vm *VMServer) CreateHandlers(_ context.Context, req *vmproto.CreateHandlersRequest) (*vmproto.CreateHandlersResponse, error)
- func (vm *VMServer) CreateStaticHandlers(context.Context, *vmproto.CreateStaticHandlersRequest) (*vmproto.CreateStaticHandlersResponse, error)
- func (vm *VMServer) GetBlock(_ context.Context, req *vmproto.GetBlockRequest) (*vmproto.GetBlockResponse, error)
- func (vm *VMServer) Health(_ context.Context, req *vmproto.HealthRequest) (*vmproto.HealthResponse, error)
- func (vm *VMServer) Initialize(_ context.Context, req *vmproto.InitializeRequest) (*vmproto.InitializeResponse, error)
- func (vm *VMServer) ParseBlock(_ context.Context, req *vmproto.ParseBlockRequest) (*vmproto.ParseBlockResponse, error)
- func (vm *VMServer) SetPreference(_ context.Context, req *vmproto.SetPreferenceRequest) (*vmproto.SetPreferenceResponse, error)
- func (vm *VMServer) Shutdown(context.Context, *vmproto.ShutdownRequest) (*vmproto.ShutdownResponse, error)
- func (vm *VMServer) Version(_ context.Context, req *vmproto.VersionRequest) (*vmproto.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 5,
MagicCookieKey: "VM_PLUGIN",
MagicCookieValue: "dynamic",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ "vm": &Plugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type BlockClient ¶
type BlockClient struct {
// contains filtered or unexported fields
}
BlockClient is an implementation of Block that talks over RPC.
func (*BlockClient) Accept ¶
func (b *BlockClient) Accept() error
func (*BlockClient) Bytes ¶
func (b *BlockClient) Bytes() []byte
func (*BlockClient) Height ¶
func (b *BlockClient) Height() uint64
func (*BlockClient) ID ¶
func (b *BlockClient) ID() ids.ID
func (*BlockClient) Parent ¶
func (b *BlockClient) Parent() ids.ID
func (*BlockClient) Reject ¶
func (b *BlockClient) Reject() error
func (*BlockClient) Status ¶
func (b *BlockClient) Status() choices.Status
func (*BlockClient) Verify ¶
func (b *BlockClient) Verify() error
type Plugin ¶
type Plugin struct { plugin.NetRPCUnsupportedPlugin // contains filtered or unexported fields }
Plugin is the implementation of plugin.Plugin so we can serve/consume this. We also implement GRPCPlugin so that this plugin can be served over gRPC.
func (*Plugin) GRPCClient ¶
func (p *Plugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient returns a new GRPC client
type VMClient ¶
VMClient is an implementation of VM that talks over RPC.
func (*VMClient) Bootstrapped ¶
func (*VMClient) Bootstrapping ¶
func (*VMClient) CreateHandlers ¶
func (vm *VMClient) CreateHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) CreateStaticHandlers ¶
func (vm *VMClient) CreateStaticHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) HealthCheck ¶
func (*VMClient) Initialize ¶
func (*VMClient) SetProcess ¶
func (vm *VMClient) SetProcess(proc *plugin.Client)
SetProcess gives ownership of the server process to the client.
type VMServer ¶
type VMServer struct { vmproto.UnimplementedVMServer // contains filtered or unexported fields }
VMServer is a VM that is managed over RPC.
func (*VMServer) BlockAccept ¶
func (vm *VMServer) BlockAccept(_ context.Context, req *vmproto.BlockAcceptRequest) (*vmproto.BlockAcceptResponse, error)
func (*VMServer) BlockReject ¶
func (vm *VMServer) BlockReject(_ context.Context, req *vmproto.BlockRejectRequest) (*vmproto.BlockRejectResponse, error)
func (*VMServer) BlockVerify ¶
func (vm *VMServer) BlockVerify(_ context.Context, req *vmproto.BlockVerifyRequest) (*vmproto.BlockVerifyResponse, error)
func (*VMServer) Bootstrapped ¶
func (vm *VMServer) Bootstrapped(context.Context, *vmproto.BootstrappedRequest) (*vmproto.BootstrappedResponse, error)
func (*VMServer) Bootstrapping ¶
func (vm *VMServer) Bootstrapping(context.Context, *vmproto.BootstrappingRequest) (*vmproto.BootstrappingResponse, error)
func (*VMServer) BuildBlock ¶
func (vm *VMServer) BuildBlock(_ context.Context, _ *vmproto.BuildBlockRequest) (*vmproto.BuildBlockResponse, error)
func (*VMServer) CreateHandlers ¶
func (vm *VMServer) CreateHandlers(_ context.Context, req *vmproto.CreateHandlersRequest) (*vmproto.CreateHandlersResponse, error)
func (*VMServer) CreateStaticHandlers ¶
func (vm *VMServer) CreateStaticHandlers(context.Context, *vmproto.CreateStaticHandlersRequest) (*vmproto.CreateStaticHandlersResponse, error)
func (*VMServer) GetBlock ¶
func (vm *VMServer) GetBlock(_ context.Context, req *vmproto.GetBlockRequest) (*vmproto.GetBlockResponse, error)
func (*VMServer) Health ¶
func (vm *VMServer) Health(_ context.Context, req *vmproto.HealthRequest) (*vmproto.HealthResponse, error)
func (*VMServer) Initialize ¶
func (vm *VMServer) Initialize(_ context.Context, req *vmproto.InitializeRequest) (*vmproto.InitializeResponse, error)
func (*VMServer) ParseBlock ¶
func (vm *VMServer) ParseBlock(_ context.Context, req *vmproto.ParseBlockRequest) (*vmproto.ParseBlockResponse, error)
func (*VMServer) SetPreference ¶
func (vm *VMServer) SetPreference(_ context.Context, req *vmproto.SetPreferenceRequest) (*vmproto.SetPreferenceResponse, error)
func (*VMServer) Shutdown ¶
func (vm *VMServer) Shutdown(context.Context, *vmproto.ShutdownRequest) (*vmproto.ShutdownResponse, error)
func (*VMServer) Version ¶
func (vm *VMServer) Version(_ context.Context, req *vmproto.VersionRequest) (*vmproto.VersionResponse, error)
Click to show internal directories.
Click to hide internal directories.