Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Set grpc version on compile time to compare against server version response. ClientGrpcVersion int32 = proto.Version )
Variables ¶
This section is empty.
Functions ¶
func NewGrpcClient ¶
NewGrpcClient returns a new grpc Client.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
func NewAuthGrpcClient ¶
func NewAuthGrpcClient(conn *grpc.ClientConn, agentToken string, agentID int64) *AuthClient
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
AuthInterceptor is a client interceptor for authentication.
func NewAuthInterceptor ¶
func NewAuthInterceptor(ctx context.Context, authClient *AuthClient, refreshDuration time.Duration) (*AuthInterceptor, error)
NewAuthInterceptor returns a new auth interceptor.
func (*AuthInterceptor) Stream ¶
func (interceptor *AuthInterceptor) Stream() grpc.StreamClientInterceptor
Stream returns a client interceptor to authenticate stream RPC.
func (*AuthInterceptor) Unary ¶
func (interceptor *AuthInterceptor) Unary() grpc.UnaryClientInterceptor
Unary returns a client interceptor to authenticate unary RPC.
Click to show internal directories.
Click to hide internal directories.