MCPcopy Index your code
hub / github.com/go-task/task / NewHTTPNode

Function NewHTTPNode

taskfile/node_http.go:73–98  ·  view source on GitHub ↗
(
	entrypoint string,
	dir string,
	insecure bool,
	opts ...NodeOption,
)

Source from the content-addressed store, hash-verified

71}
72
73func NewHTTPNode(
74 entrypoint string,
75 dir string,
76 insecure bool,
77 opts ...NodeOption,
78) (*HTTPNode, error) {
79 base := NewBaseNode(dir, opts...)
80 url, err := url.Parse(entrypoint)
81 if err != nil {
82 return nil, err
83 }
84 if url.Scheme == "http" && !insecure {
85 return nil, &errors.TaskfileNotSecureError{URI: url.Redacted()}
86 }
87
88 client, err := buildHTTPClient(insecure, base.caCert, base.cert, base.certKey)
89 if err != nil {
90 return nil, err
91 }
92
93 return &HTTPNode{
94 baseNode: base,
95 url: url,
96 client: client,
97 }, nil
98}
99
100func (node *HTTPNode) Location() string {
101 return node.url.Redacted()

Callers 2

NewNodeFunction · 0.85
TestHTTPNode_CacheKeyFunction · 0.85

Calls 2

NewBaseNodeFunction · 0.85
buildHTTPClientFunction · 0.85

Tested by 1

TestHTTPNode_CacheKeyFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…