lotus/api/struct.go

24 lines
427 B
Go
Raw Normal View History

package api
import (
"context"
"github.com/libp2p/go-libp2p-core/peer"
)
type Struct struct {
Internal struct{
ID func(context.Context) (peer.ID, error)
Version func(context.Context) (Version, error)
}
}
func (c *Struct) ID(ctx context.Context) (peer.ID, error) {
return c.Internal.ID(ctx)
}
func (c *Struct) Version(ctx context.Context) (Version, error) {
return c.Internal.Version(ctx)
}
var _ API = &Struct{}