Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTransportOptions ¶
func AddTransportOptions(targetUrl string, opts TransportOptions)
func EffectiveURL ¶
EffectiveURL returns the effective URL for requests.
Given that TransportOptions can allow for the target URL to be overriden this returns the same input if Managed Transport is disabled or if no TargetURL is set on TransportOptions.
func Enabled ¶
func Enabled() bool
Enabled defines whether the use of Managed Transport should be enabled. This is only affects git operations that uses libgit2 implementation.
True is returned when the environment variable `EXPERIMENTAL_GIT_TRANSPORT` is detected with the value of `true` or `1`.
func InitManagedTransport ¶
InitManagedTransport initialises HTTP(S) and SSH managed transport for git2go, and therefore only impact git operations using the libgit2 implementation.
This must run after git2go.init takes place, hence this is not executed within a init(). Regardless of the state in libgit2/git2go, this will replace the built-in transports.
This function will only register managed transports once, subsequent calls leads to no-op.
func RemoveTransportOptions ¶
func RemoveTransportOptions(targetUrl string)
Types ¶
type TransportOptions ¶
TransportOptions represents options to be applied at transport-level at request time.