Documentation
¶
Index ¶
Constants ¶
const ( // ClientMaxReceiveMessageSize - Max gRPC message size ~2Gb. ClientMaxReceiveMessageSize = (2 * gb) - 1 // 2Gb - 1 byte )
Variables ¶
var ErrNoTLSCredentials = errors.New("the Teamclient has no TLS credentials to use")
ErrNoTLSCredentials is an error raised if the teamclient was asked to setup, or try connecting with, TLS credentials. If such an error is raised, make sure your team client has correctly fetched -using client.Config()- a remote teamserver config.
Functions ¶
func LogMiddlewareOptions ¶
func LogMiddlewareOptions(cli *client.Client) []grpc.DialOption
LogMiddlewareOptions is an example list of gRPC options with logging middleware set up. This function uses the core teamclient loggers to log the gRPC stack/requests events. The Teamclient of this package uses them by default.
func TLSAuthMiddleware ¶
func TLSAuthMiddleware(cli *client.Client) ([]grpc.DialOption, error)
Types ¶
type TeamClient ¶
type TeamClient struct {
Conn *grpc.ClientConn
// contains filtered or unexported fields
}
TeamClient is a type implementing the reeflective/team/client.Dialer interface, and can thus be used to communicate with any remote or in-memory Sliver teamserver. When used to connect remotely, this type can safely be instantiated with `new(transport.Teamclient)`.
func NewClient ¶
func NewClient(opts ...grpc.DialOption) *TeamClient
NewClient creates a teamclient transport with specific gRPC options. It can also be used for in-memory clients, which specify their dialer.
func (*TeamClient) Close ¶
func (h *TeamClient) Close() error
Close implements team/client.Dialer.Close(). It closes the gRPC client connection if any.
func (*TeamClient) Dial ¶
func (h *TeamClient) Dial() (err error)
Dial implements team/client.Dialer.Dial(). It uses the teamclient remote server configuration as a target of a dial call. If the connection is successful, the teamclient registers a Sliver RPC client.
type TokenAuth ¶
type TokenAuth string
TokenAuth extracts authentication metadata from contexts, specifically the "Authorization": "Bearer" key:value pair.
func (TokenAuth) GetRequestMetadata ¶
Return value is mapped to request headers.
func (TokenAuth) RequireTransportSecurity ¶
RequireTransportSecurity always return true.