func newStack(bs *provider.BaseStack) (provider.Stack, error) { if bs.TunnelURL == "" { return nil, errors.New("no tunnel URL provided") } u, err := url.Parse(bs.TunnelURL) if err != nil { return nil, err } u.Path = "/kite" s := &Stack{ BaseStack: bs, TunnelURL: u, api: &vagrantapi.Klient{ Kite: bs.Session.Kite, Log: bs.Log.New("vagrantapi"), Debug: bs.Debug || bs.TraceID != "", }, } bs.Planner.OnDial = s.checkTunnel bs.PlanFunc = s.plan return s, nil }
func newStack(bs *provider.BaseStack) (provider.Stack, error) { s := &Stack{ BaseStack: bs, EntrypointBaseURL: "https://koding-klient.s3.amazonaws.com/entrypoint", ScreenURL: "https://koding-dl.s3.amazonaws.com/screen.tar.gz", CertURL: "https://koding-dl.s3.amazonaws.com/ca-certificates.crt.gz", KlientURL: stack.Konfig.KlientGzURL(), } bs.PlanFunc = s.plan bs.StateFunc = s.state return s, nil }