<commit_before>package daemon

import (
	"errors"
	"fmt"
	"net/http"
	"sync"
	"time"

	"koding/kites/config"
	"koding/kites/config/configstore"
	conf "koding/klientctl/config"
	"koding/klientctl/ctlcli"
	"koding/klientctl/endpoint/auth"
	"koding/klientctl/endpoint/kloud"

	"github.com/koding/logging"
)

var DefaultClient = &Client{}

type Client struct {
	Konfig  *config.Konfig
	Store   *configstore.Client
	Log     logging.Logger
	Script  []InstallStep
	Timeout time.Duration

	once sync.Once
	d    *Details
}

func (c *Client) Start() error {
	return nil
}

func (c *Client) Restart() error {
	return nil
}

func (c *Client) Stop() error {
	return nil
}
<commit_msg>kd/daemon: add Start / Restart / Stop methods<commit_after>package daemon

import (
	"errors"
	"fmt"
	"net/http"
	"sync"
	"time"

	"koding/kites/config"
	"koding/kites/config/configstore"
	conf "koding/klientctl/config"
	"koding/klientctl/ctlcli"
	"koding/klientctl/endpoint/auth"
	"koding/klientctl/endpoint/kloud"

	"github.com/koding/logging"
)

var DefaultClient = &Client{}

type Client struct {
	Konfig  *config.Konfig
	Store   *configstore.Client
	Log     logging.Logger
	Script  []InstallStep
	Timeout time.Duration

	once sync.Once
	d    *Details
}

func (c *Client) Start() error {
	svc, err := c.d.service()
	if err != nil {
		return err
	}
	if err = svc.Start(); err != nil {
		return err
	}
	return c.Ping()
}

func (c *Client) Restart() error {
	svc, err := c.d.service()
	if err != nil {
		return err
	}
	_ = svc.Stop()
	if err = svc.Start(); err != nil {
		return err
	}
	return c.Ping()
}

func (c *Client) Stop() error {
	svc, err := c.d.service()
	if err != nil {
		return err
	}
	return svc.Stop()
}

{'fraction_non_alphanumeric': 0.1407451212300414, 'fraction_numerical': 0.0, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1070109', 'n_tokens_mistral': 693, 'n_tokens_neox': 681, 'n_words': 158}