Documentation
¶
Index ¶
- Constants
- Variables
- func Serve(provider interface{ ... })
- type GRPCClient
- func (g *GRPCClient) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- func (g *GRPCClient) Configure(ctx context.Context, message json.RawMessage) error
- func (g *GRPCClient) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- func (g *GRPCClient) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (g *GRPCClient) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- type GRPCServer
- func (g *GRPCServer) AppendRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
- func (g *GRPCServer) Configure(ctx context.Context, request *proto.ConfigureRequest) (*proto.ConfigureResponse, error)
- func (g *GRPCServer) DeleteRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
- func (g *GRPCServer) GetRecords(ctx context.Context, request *proto.GetRecordsRequest) (*proto.RecordsResponse, error)
- func (g *GRPCServer) SetRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
- type Provider
- type ProviderPlugin
Constants ¶
View Source
const ProviderPluginName = "provider"
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "LIBDNS_PLUGIN",
MagicCookieValue: "k29lqez4d5dzfh629t2it4fv8n804blr38nj9495uj3wqrgoyzalmg2l7jnqmz6e",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ ProviderPluginName: &ProviderPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
func Serve ¶
func Serve(provider interface { libdns.RecordGetter libdns.RecordSetter libdns.RecordAppender libdns.RecordDeleter })
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func (*GRPCClient) AppendRecords ¶
func (*GRPCClient) Configure ¶
func (g *GRPCClient) Configure(ctx context.Context, message json.RawMessage) error
func (*GRPCClient) DeleteRecords ¶
func (*GRPCClient) GetRecords ¶
type GRPCServer ¶
type GRPCServer struct { Impl Provider // contains filtered or unexported fields }
func (*GRPCServer) AppendRecords ¶
func (g *GRPCServer) AppendRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
func (*GRPCServer) Configure ¶
func (g *GRPCServer) Configure(ctx context.Context, request *proto.ConfigureRequest) (*proto.ConfigureResponse, error)
func (*GRPCServer) DeleteRecords ¶
func (g *GRPCServer) DeleteRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
func (*GRPCServer) GetRecords ¶
func (g *GRPCServer) GetRecords(ctx context.Context, request *proto.GetRecordsRequest) (*proto.RecordsResponse, error)
func (*GRPCServer) SetRecords ¶
func (g *GRPCServer) SetRecords(ctx context.Context, request *proto.RecordsRequest) (*proto.RecordsResponse, error)
type Provider ¶
type Provider interface { libdns.RecordGetter libdns.RecordSetter libdns.RecordAppender libdns.RecordDeleter Configure(context.Context, json.RawMessage) error }
type ProviderPlugin ¶
type ProviderPlugin struct { plugin.NetRPCUnsupportedPlugin Impl Provider }
func (*ProviderPlugin) GRPCClient ¶
func (p *ProviderPlugin) GRPCClient(_ context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*ProviderPlugin) GRPCServer ¶
func (p *ProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.