This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/solver/socketprovider_unix.go
Andrea Luzzardi 5b7b1cab79 Migrate dagger.#Secret and dagger.#Stream to new format
- Refactored to keep every transformation of built-in types (e.g. FS,
  Secret, etc) to/from CUE in the same place (plancontext)
- dagger.#Service and dagger.#Secret are now following the new FS-like format
  (e.g. `_service: id: string`)
- Backward compatibility
- dagger.#Stream is now an alias for dagger.#Service

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-01 17:33:35 -08:00

21 lines
342 B
Go

//go:build !windows
// +build !windows
package solver
import (
"errors"
"net"
"time"
"go.dagger.io/dagger/plancontext"
)
func dialService(service *plancontext.Service) (net.Conn, error) {
if service.Unix() == "" {
return nil, errors.New("unsupported socket type")
}
return net.DialTimeout("unix", service.Unix(), time.Second)
}