1. Home
  2. Docs
  3. Chainlink Adapters
  4. Private: Linkpool Bridges
  5. Create External Adapter (LinkPool Bridges)

Create External Adapter (LinkPool Bridges)

Implement your own

package main

import (
	"github.com/linkpoolio/bridges/bridge"
)

type MyAdaptor struct{}

func (ma *MyAdaptor) Run(h *bridge.Helper) (interface{}, error) {
	return map[string]string{"hello": "world"}, nil
}

func (ma *MyAdaptor) Opts() *bridge.Opts {
	return &bridge.Opts{
		Name:   "MyAdaptor",
		Lambda: true,
	}
}

func main() {
	bridge.NewServer(&MyAdaptor{}).Start(8080)
}
Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *