lotus/api/struct.go
Jakub Sztandera 5736ac1d9d go fmt
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-07-01 23:11:34 +02:00

25 lines
434 B
Go

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{}