Documentation ¶
Index ¶
- Variables
- func NewFloat32(x float32) *gpb.FloatValue
- func NewRedisClient(args ...interface{}) (*redis.Client, error)
- func NewString(s string) *gpb.StringValue
- func NewUInt64(x uint64) *gpb.UInt64Value
- type ClientFactory
- func (f *ClientFactory) NewConnection(cfg_val ClientType, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (f *ClientFactory) NewDeviceServiceClient(opts ...grpc.DialOption) (device_pb.DeviceServiceClient, CloseFn, error)
- func (f *ClientFactory) NewDevicedServiceClient(opts ...grpc.DialOption) (deviced_pb.DevicedServiceClient, CloseFn, error)
- func (f *ClientFactory) NewIdentityd2ServiceClient(opts ...grpc.DialOption) (identityd2_pb.IdentitydServiceClient, CloseFn, error)
- func (f *ClientFactory) NewModuleSerivceClient(opts ...grpc.DialOption) (component_pb.ModuleServiceClient, CloseFn, error)
- func (f *ClientFactory) NewPolicydServiceClient(opts ...grpc.DialOption) (policyd_pb.PolicydServiceClient, CloseFn, error)
- type ClientType
- type CloseFn
- type DialOptionFn
- 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 NewFloat32 ¶
func NewFloat32(x float32) *gpb.FloatValue
func NewRedisClient ¶
func NewString ¶
func NewString(s string) *gpb.StringValue
func NewUInt64 ¶
func NewUInt64(x uint64) *gpb.UInt64Value
Types ¶
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
func NewClientFactory ¶
func NewClientFactory(configs ServiceConfigs, optFn DialOptionFn) (*ClientFactory, 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, CloseFn, error)
func (*ClientFactory) NewDevicedServiceClient ¶
func (f *ClientFactory) NewDevicedServiceClient(opts ...grpc.DialOption) (deviced_pb.DevicedServiceClient, CloseFn, error)
func (*ClientFactory) NewIdentityd2ServiceClient ¶
func (f *ClientFactory) NewIdentityd2ServiceClient(opts ...grpc.DialOption) (identityd2_pb.IdentitydServiceClient, CloseFn, error)
func (*ClientFactory) NewModuleSerivceClient ¶
func (f *ClientFactory) NewModuleSerivceClient(opts ...grpc.DialOption) (component_pb.ModuleServiceClient, CloseFn, error)
func (*ClientFactory) NewPolicydServiceClient ¶
func (f *ClientFactory) NewPolicydServiceClient(opts ...grpc.DialOption) (policyd_pb.PolicydServiceClient, CloseFn, error)
type ClientType ¶
type ClientType int32
const ( DEFAULT_CONFIG ClientType = iota POLICYD_CONFIG IDENTITYD2_CONFIG DEVICED_CONFIG DEVICE_CONFIG MODULE_CONFIG OVERFLOW_CONFIG )
func (ClientType) String ¶
func (self ClientType) String() string
type DialOptionFn ¶
type DialOptionFn func() []grpc.DialOption
func DefaultDialOptionFn ¶
func DefaultDialOptionFn() DialOptionFn
type ServiceConfig ¶
type ServiceConfig struct {
Address string
}
type ServiceConfigs ¶
type ServiceConfigs map[ClientType]ServiceConfig
func NewDefaultServiceConfigs ¶
func NewDefaultServiceConfigs(addr string) ServiceConfigs
func (ServiceConfigs) SetServiceConfig ¶
func (self ServiceConfigs) SetServiceConfig(typ ClientType, cfg ServiceConfig)
Click to show internal directories.
Click to hide internal directories.