Documentation
¶
Index ¶
- Variables
- func MakeClient(envUI env_ui.Env, transport http.RoundTripper, repo *local_working_copy.Repo, ...) *client
- func MakeStdioListener() net.Listener
- func ReadErrorFromBody(response *http.Response) (err error)
- func ReadErrorFromBodyOnGreaterOrEqual(response *http.Response, status int) (err error)
- func ReadErrorFromBodyOnNot(response *http.Response, statuses ...int) (err error)
- type HTTPPort
- type MethodPath
- type Request
- type Response
- type RoundTripperBufioWrappedSigner
- type RoundTripperHost
- type RoundTripperRetry
- type RoundTripperStdio
- type RoundTripperUnixSocket
- type Server
- func (server *Server) InitializeHTTP(config net.ListenConfig, port int) (httpPort HTTPPort, err error)
- func (server *Server) InitializeListener(network, address string) (listener net.Listener, err error)
- func (server *Server) InitializeUnixSocket(config net.ListenConfig, path string) (sock repo.UnixSocket, err error)
- func (server *Server) Serve(listener net.Listener) (err error)
- func (server *Server) ServeStdio()
- type StdioConn
- func (conn *StdioConn) Close() error
- func (conn *StdioConn) LocalAddr() net.Addr
- func (conn *StdioConn) Read(b []byte) (n int, err error)
- func (conn *StdioConn) RemoteAddr() net.Addr
- func (conn *StdioConn) SetDeadline(t time.Time) error
- func (conn *StdioConn) SetReadDeadline(t time.Time) error
- func (conn *StdioConn) SetWriteDeadline(t time.Time) error
- func (conn *StdioConn) Write(b []byte) (n int, err error)
- type StdioListener
- type UrlData
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRoundTripper http.RoundTripper
Functions ¶
func MakeClient ¶
func MakeClient( envUI env_ui.Env, transport http.RoundTripper, repo *local_working_copy.Repo, typedBlobStore inventory_list_coders.Closet, ) *client
func ReadErrorFromBodyOnGreaterOrEqual ¶
Types ¶
type Request ¶
type Request struct {
MethodPath
Headers http.Header
Body io.ReadCloser
// contains filtered or unexported fields
}
type Response ¶
type Response struct {
StatusCode int
Body io.ReadCloser
// contains filtered or unexported fields
}
type RoundTripperBufioWrappedSigner ¶
type RoundTripperBufioWrappedSigner struct {
PublicKey interfaces.MarklId
// contains filtered or unexported fields
}
type RoundTripperHost ¶
type RoundTripperHost struct {
UrlData
http.RoundTripper
}
A round tripper that decorates another round tripper and always populates the http requests with given UrlData template.
type RoundTripperRetry ¶
type RoundTripperRetry struct {
RetryFunc func(error) bool
RetryCount int
http.RoundTripper
}
func MakeRoundTripperRetry ¶
func MakeRoundTripperRetry( inner http.RoundTripper, count int, retryFunc func(error) bool, ) RoundTripperRetry
func MakeRoundTripperRetryTimeouts ¶
func MakeRoundTripperRetryTimeouts( inner http.RoundTripper, count int, ) RoundTripperRetry
type RoundTripperStdio ¶
type RoundTripperStdio struct {
exec.Cmd
io.WriteCloser
io.ReadCloser
RoundTripperBufioWrappedSigner
}
func (*RoundTripperStdio) InitializeWithLocal ¶
func (roundTripper *RoundTripperStdio) InitializeWithLocal( envRepo env_repo.Env, config store_config.Config, pubkey interfaces.MarklId, ) (err error)
type RoundTripperUnixSocket ¶
type RoundTripperUnixSocket struct {
repo.UnixSocket
net.Conn
RoundTripperBufioWrappedSigner
}
type Server ¶
type Server struct {
EnvLocal env_local.Env
Repo *local_working_copy.Repo
GetCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error)
// contains filtered or unexported fields
}
func (*Server) InitializeHTTP ¶
func (*Server) InitializeListener ¶
func (server *Server) InitializeListener( network, address string, ) (listener net.Listener, err error)
TODO switch to not return error
func (*Server) InitializeUnixSocket ¶
func (server *Server) InitializeUnixSocket( config net.ListenConfig, path string, ) (sock repo.UnixSocket, err error)
func (*Server) Serve ¶
TODO remove error return and use context
type StdioConn ¶
type StdioConn struct {
// contains filtered or unexported fields
}
type StdioListener ¶
type StdioListener struct {
// contains filtered or unexported fields
}
func (*StdioListener) Accept ¶
func (listener *StdioListener) Accept() (conn net.Conn, err error)
func (*StdioListener) Addr ¶
func (listener *StdioListener) Addr() net.Addr
func (*StdioListener) Close ¶
func (listener *StdioListener) Close() error
Source Files
¶
- client.go
- client_blob_store.go
- client_closet.go
- client_inventory_list_store.go
- listener_stdio.go
- request_response.go
- round_tripper_bufio.go
- round_tripper_host.go
- round_tripper_retry.go
- round_tripper_stdio.go
- round_tripper_unix_socket.go
- round_tripper_wrapped_signer.go
- server.go
- server_blob_cache.go
- server_mcp.go
- server_repo.go
- server_working_copy.go
Click to show internal directories.
Click to hide internal directories.