Documentation ¶
Index ¶
- Variables
- func DefaultDialOption() []grpc.DialOption
- func NewClientTransportCredentials(cert_file, key_file string, plain_text, insecure bool) (credentials.TransportCredentials, error)
- func NewFloat32(x float32) *gpb.FloatValue
- func NewServerTransportCredentials(cert_file, key_file string) (credentials.TransportCredentials, error)
- func NewString(s string) *gpb.StringValue
- func NewUInt64(x uint64) *gpb.UInt64Value
- func ToClientFactory(v **ClientFactory) func(string, interface{}) error
- func ToMinioClient(v **minio.Client) func(string, any) error
- type ClientFactory
- func (f *ClientFactory) GetConnection(cfg_val ClientType, opts ...grpc.DialOption) (*grpc.ClientConn, DoneFn, error)
- func (f *ClientFactory) NewConnection(cfg_val ClientType, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (f *ClientFactory) NewDeviceServiceClient(opts ...grpc.DialOption) (device_pb.DeviceServiceClient, DoneFn, error)
- func (f *ClientFactory) NewDevicedServiceClient(opts ...grpc.DialOption) (deviced_pb.DevicedServiceClient, DoneFn, error)
- func (f *ClientFactory) NewEvaluatordServiceClient(opts ...grpc.DialOption) (evaluatord_pb.EvaluatordServiceClient, DoneFn, error)
- func (f *ClientFactory) NewIdentityd2ServiceClient(opts ...grpc.DialOption) (identityd2_pb.IdentitydServiceClient, DoneFn, error)
- func (f *ClientFactory) NewModuleServiceClient(opts ...grpc.DialOption) (component_pb.ModuleServiceClient, DoneFn, error)
- func (f *ClientFactory) NewPolicydServiceClient(opts ...grpc.DialOption) (policyd_pb.PolicydServiceClient, DoneFn, error)
- func (f *ClientFactory) NewTagdServiceClient(opts ...grpc.DialOption) (tagd_pb.TagdServiceClient, DoneFn, error)
- type ClientType
- type DoneFn
- type NewClientFactoryOption
- type RedisClient
- type ServiceConfig
- type ServiceConfigs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgument = errors.New("invalid argument") ErrMissingDefaultConfig = errors.New("require default config") )
Functions ¶
func DefaultDialOption ¶ added in v1.1.2
func DefaultDialOption() []grpc.DialOption
func NewClientTransportCredentials ¶ added in v1.1.10
func NewClientTransportCredentials(cert_file, key_file string, plain_text, insecure bool) (credentials.TransportCredentials, error)
func NewFloat32 ¶
func NewFloat32(x float32) *gpb.FloatValue
func NewServerTransportCredentials ¶ added in v1.1.10
func NewServerTransportCredentials(cert_file, key_file string) (credentials.TransportCredentials, error)
func NewString ¶
func NewString(s string) *gpb.StringValue
func NewUInt64 ¶
func NewUInt64(x uint64) *gpb.UInt64Value
func ToClientFactory ¶ added in v1.1.26
func ToClientFactory(v **ClientFactory) func(string, interface{}) error
func ToMinioClient ¶
Types ¶
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
func NewClientFactory ¶
func NewClientFactory(configs ServiceConfigs, dial_opts []grpc.DialOption, opts ...NewClientFactoryOption) (*ClientFactory, error)
func (*ClientFactory) GetConnection ¶ added in v1.2.11
func (f *ClientFactory) GetConnection(cfg_val ClientType, opts ...grpc.DialOption) (*grpc.ClientConn, DoneFn, error)
func (*ClientFactory) NewConnection ¶
func (f *ClientFactory) NewConnection(cfg_val ClientType, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func (*ClientFactory) NewDeviceServiceClient ¶
func (f *ClientFactory) NewDeviceServiceClient(opts ...grpc.DialOption) (device_pb.DeviceServiceClient, DoneFn, error)
func (*ClientFactory) NewDevicedServiceClient ¶
func (f *ClientFactory) NewDevicedServiceClient(opts ...grpc.DialOption) (deviced_pb.DevicedServiceClient, DoneFn, error)
func (*ClientFactory) NewEvaluatordServiceClient ¶ added in v1.1.24
func (f *ClientFactory) NewEvaluatordServiceClient(opts ...grpc.DialOption) (evaluatord_pb.EvaluatordServiceClient, DoneFn, error)
func (*ClientFactory) NewIdentityd2ServiceClient ¶
func (f *ClientFactory) NewIdentityd2ServiceClient(opts ...grpc.DialOption) (identityd2_pb.IdentitydServiceClient, DoneFn, error)
func (*ClientFactory) NewModuleServiceClient ¶ added in v1.2.0
func (f *ClientFactory) NewModuleServiceClient(opts ...grpc.DialOption) (component_pb.ModuleServiceClient, DoneFn, error)
func (*ClientFactory) NewPolicydServiceClient ¶
func (f *ClientFactory) NewPolicydServiceClient(opts ...grpc.DialOption) (policyd_pb.PolicydServiceClient, DoneFn, error)
func (*ClientFactory) NewTagdServiceClient ¶
func (f *ClientFactory) NewTagdServiceClient(opts ...grpc.DialOption) (tagd_pb.TagdServiceClient, DoneFn, error)
type ClientType ¶
type ClientType int32
const ( DEFAULT_CONFIG ClientType = iota POLICYD_CONFIG IDENTITYD2_CONFIG DEVICED_CONFIG TAGD_CONFIG EVALUATORD_CONFIG DEVICE_CONFIG MODULE_CONFIG OVERFLOW_CONFIG )
func (ClientType) String ¶
func (self ClientType) String() string
type NewClientFactoryOption ¶ added in v1.2.11
type NewClientFactoryOption func(*newClientFactoryOption)
func SetDialPoolSize ¶ added in v1.2.11
func SetDialPoolSize(siz int32) NewClientFactoryOption
type RedisClient ¶ added in v1.2.4
type RedisClient = redis.UniversalClient
func NewRedisClient ¶
func NewRedisClient(args ...interface{}) (RedisClient, error)
type ServiceConfig ¶
type ServiceConfig struct { Address string TransportCredentials credentials.TransportCredentials }
type ServiceConfigs ¶
type ServiceConfigs map[ClientType]ServiceConfig
func NewDefaultServiceConfigs ¶
func NewDefaultServiceConfigs(addr string, cred credentials.TransportCredentials) ServiceConfigs
func (ServiceConfigs) SetServiceConfig ¶
func (self ServiceConfigs) SetServiceConfig(typ ClientType, cfg ServiceConfig)
Click to show internal directories.
Click to hide internal directories.