24 lines
501 B
Go
24 lines
501 B
Go
package host
|
|
|
|
import (
|
|
"git.wzray.com/homelab/hivemind/internal/transport"
|
|
"git.wzray.com/homelab/hivemind/internal/types"
|
|
)
|
|
|
|
type Client struct {
|
|
caller transport.Caller
|
|
}
|
|
|
|
func New(caller transport.Caller) *Client {
|
|
return &Client{
|
|
caller: caller,
|
|
}
|
|
}
|
|
|
|
func (c *Client) Dns(endpoint string) (types.HostState, error) {
|
|
return dnsRoute.CallNoInput(c.caller, endpoint)
|
|
}
|
|
|
|
func (c *Client) Nameserver(endpoint string) (types.HostState, error) {
|
|
return nsRoute.CallNoInput(c.caller, endpoint)
|
|
}
|