Documentation
¶
Overview ¶
Package sharedport provides client functionality for HTCondor's shared port protocol.
The shared port protocol allows multiple HTCondor daemons to share a single network port by having a shared port server daemon forward connections to the appropriate daemon based on a shared port ID.
This implementation is based on the HTCondor C++ reference implementation in shared_port_client.cpp and related files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SharedPortClient ¶
type SharedPortClient struct {
// contains filtered or unexported fields
}
SharedPortClient handles connections to daemons behind HTCondor's shared port
func NewSharedPortClient ¶
func NewSharedPortClient(clientName string) *SharedPortClient
NewSharedPortClient creates a new shared port client
func (*SharedPortClient) ConnectToHTCondorAddress ¶
func (spc *SharedPortClient) ConnectToHTCondorAddress(ctx context.Context, address string, deadline time.Duration) (*stream.Stream, error)
ConnectToHTCondorAddress is a convenience function that can connect to any HTCondor address, handling both regular TCP connections and shared port connections automatically.
It takes: - ctx: context for cancellation and timeouts - address: HTCondor address (e.g., "host:port" or "host:port?sock=daemon") - deadline: connection timeout
Returns a stream connected to the target daemon
func (*SharedPortClient) ConnectViaSharedPort ¶
func (spc *SharedPortClient) ConnectViaSharedPort(ctx context.Context, sharedPortAddr, sharedPortID string, deadline time.Duration) (*stream.Stream, error)
ConnectViaSharedPort connects to a daemon through HTCondor's shared port mechanism
It takes: - ctx: context for cancellation and timeouts - sharedPortAddr: the address of the shared port server (host:port) - sharedPortID: the ID of the target daemon (e.g., "startd", "schedd") - deadline: connection timeout
Returns a stream connected directly to the target daemon