// ServiceWithName sets the name of the service
492047
func ServiceWithName(name string) ServiceSpecOpt {
	return func(spec *swarmtypes.ServiceSpec) {
		spec.Annotations.Name = name
	}
}
125358
func ServiceName(ctx context.Context) (string, bool) {
	v, ok := stringValue(ctx, ServiceKey)
	if !ok {
		v, ok = stringValue(ctx, StorageServiceKey)
	}
	return v, ok
}
708197
func (s *ServiceSpecificCredentialMetadata) SetServiceUserName(v string) *ServiceSpecificCredentialMetadata {
	s.ServiceUserName = &v
	return s
}
1121554
func packageWithName(name string) (pkg *build.Package, err error) {
	pkg, err = build.Default.Import(name, ".", build.ImportMode(0))
	if err == nil {
		return
	}

	pkg, err = build.Default.Import(name, ".", build.ImportMode(1))
	return
}
663293
func (c *Context) Service() *Service {
	s, _ := serviceByName(c.ServiceName)
	return s
}
1034549
func (s *ServiceHook) GetName() string {
	if s == nil || s.Name == nil {
		return ""
	}
	return *s.Name
}
786584
func WithHostname(name string) SpecOpts {
	return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
		s.Hostname = name
		return nil
	}
}
792711
func WithName(name string) ProviderOpts {
	return func(p *Provider) error {
		p.Name = name
		return nil
	}
}
454816
func NewServerWithName(name string) (*Server, error) {
	return &Server{
		name:name,
		svcs: defaultServices(name),
		db:   att.NewDB(defaultServices(name), uint16(1)),
	}, nil
}
236212
func (o *GetMapNameParams) WithName(name string) *GetMapNameParams {
	o.SetName(name)
	return o
}
1071762
func AddNodeWithService(serviceName string) AddNodeOption {
	return func(o *adapters.NodeConfig) {
		o.Services = append(o.Services, serviceName)
	}
}
371543
func (o *DeleteNodesIdentifierTagsTagnameParams) WithTagname(tagname string) *DeleteNodesIdentifierTagsTagnameParams {
	o.Tagname = tagname
	return o
}
305809
func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary {
	s.ServiceName = &v
	return s
}
257406
func FromName(name string) (serviceName string, methodName string) {
	parts := strings.SplitN(name, "::", 2)
	if len(parts) == 1 {
		return parts[0], ""
	}
	return parts[0], parts[1]
}
16154
func (s *ListTasksInput) SetServiceName(v string) *ListTasksInput {
	s.ServiceName = &v
	return s
}
430357
func (s *UpdateVPCEConfigurationInput) SetServiceDnsName(v string) *UpdateVPCEConfigurationInput {
	s.ServiceDnsName = &v
	return s
}
102674
func WithServerName(serverName string) Option {
	return func(p *Peer) error {
		p.serverName = serverName

		return nil
	}
}